User Tools

Site Tools


validate_validate_prompt_input_.htm
Navigation:  Templates > Template Language Reference > Complete Alpha Listing >====== #VALIDATE (validate prompt input) C6H0068.jpg ====== Previous pageReturn to chapter overviewNext page

#VALIDATE( expression,message )

blk2blue.jpg

#VALIDATE Validates the data entered into the immediately preceding #PROMPT field.
expression The expression to use to validate the entered data.
message A string constant containing the error message to display if the data is invalid.

The #VALIDATE statement validates the data entered into the #PROMPT field immediately preceding the #VALIDATE. The expression is evaluated when the OK button is pressed on the Procedure Properties window. If the expression is false, the message is displayed to the programmer in a message box, and control is given to the #PROMPT field that immediately precedes the #VALIDATE. There may be multiple #VALIDATE statements following a #PROMPT to validate the entry. A #PREPARE structure may follow a #PROMPT prior to the #VALIDATE, but no other template statements are valid between #PROMPT and #VALIDATE, including template comments.

Example:

#PROMPT('Input Value, Even numbers from 100-200',@N3),%Value

#VALIDATE1), %ChangeDateGroup,REQ

#PREPARE

#FIX(%File,%Primary)

#FIX(%Field,%ChangeDateGroup)

#ENDPREPARE

#VALIDATE(%FieldType = 'GROUP','Change Date Group must be of type GROUP!')

See Also:     #PROMPT

1)
%Value > 100) AND (%Value <; 200),'Value must be between 100 and 200') #VALIDATE((%Value % 2 = 0),'Value must be an even number') #PROMPT('Screen Field',CONTROL),%SomeField #PREPARE #FIX(%Control,%SomeField) #ENDPREPARE #VALIDATE(%ControlType = 'LIST','Must select a list box') #PROMPT('Select Change Date/Time Group:',FIELD(%Primary
validate_validate_prompt_input_.htm.txt · Last modified: 2021/04/15 15:57 (external edit)