Validate a field of the current occurrence.
|Field||String||Field to validate|
|<0||An error occurred. $procerror contains the exact error.|
|>=0||Statement executed successfully|
||Changes to the active path not allowed.|
||A trigger returned a negative value in $status.|
||An error in declarative syntax occurred.|
||An incorrect field name was provided; either the field name is not valid syntactically or the field is not available in the component.|
Whenever an error occurs, the field-level error is activated. The function $dataerrorcontext contains information about the exact context of the error, and the function $procerrorcontext indicates the exact location of the error.
Allowed in all component types, except self-contained Reports.
The validatefield statement validates the specified field of the current occurrence. If the field is marked as modified and has not been successfully validated or if $fieldcheck is 1, declarative checks for Field are performed and the validate trigger is activated. For more information, see validate.
If the field is successfully validated, the validate trigger sets $fieldvalidation to 0.
Note: Validation statements (validatefield, validatekey, validateocc, and validate) activate the validation triggers such as validate and validatekey. You should therefore be careful when using these statements in validation triggers.
$MYFIELD$ = "CUSTID.CUSTOMER" validatefield $MYFIELD$