Form specification files / Form item attributes |
The VALIDATE LIKE attribute applies column attributes defined in the .val database schema files to a field.
VALIDATE LIKE [table.]column
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 that .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, you should 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.
EDIT f001 = FORMONLY.fullname, VALIDATE LIKE customer.custname;