VALIDATE LIKE attribute
The VALIDATE LIKE
attribute applies column attributes defined in the
.val database schema files to a field.
Syntax
VALIDATE LIKE [table.]column
Note:
- table is the optional table name to qualify the column.
- column is the name of the column used to search for validation rules.
Usage
Specifying the VALIDATE LIKE
attribute is equivalent to writing in the
field definition all the attributes that are assigned to
table.column in the
.val database schema file.
Note: The .val attributes are taken automatically from the schema file if the
field is linked to table.column in the field name
specification. The
VALIDATE LIKE
attribute is usually specified for
FORMONLY
fields.The VALIDATE LIKE
attribute is evaluated at compile time, not at runtime.
If the database schema file changes, recompile all your forms.
Even if all of the fields in the form are FORMONLY
,
the VALIDATE LIKE
attribute requires the form compiler
to access the database schema file that contains the description of table.
Example
EDIT f001 = FORMONLY.fullname, VALIDATE LIKE customer.custname;