Field validation

To achieve the most accurate interpretation of your forms, you must define each field as specifically and accurately as possible on the form definition.

One aspect of a field definition is field validations. There are many different field validations to choose from. The simplest ones, found in the Field validation group box on the Standard tab, are described below. To read about additional field validations, click one of the Related topics.

The Field validation group box

Select all the field validations that can be applied to each field without too much verification work on your part. These are field validations that FORMS can perform directly after interpreting the field, for example when the value of the field is independent of other fields’ values.

Not all field types can be subjected to field validations. When you select a field type, the alternatives (if any) available for that field type become active.

Setting

Description

Must be filled in

If the field is not filled in, FORMS shows it to you during the verification process.

Most field types support this option. With image fields, you can also adjust FORMS sensitivity to changes in the field.

Confirm

You must confirm the interpreted value (if any) during verification.

An alternative to selecting Confirm here is to select it on the Options tab, where you can specify certain conditions, as well.

From and To

Use these to specify a valid range for a numeric field. For example, type 1 and 12 to have FORMS check whether the interpreted value of the current numerical field is greater than or equal to 1 and less than or equal to 12.

No decimals are allowed here.

Checksum

FORMS performs a modulo 10 check-digit control of a numeric field.

Table name

FORMS checks the specified table before accepting the field value. Use this when a limited number of values are possible for a field. (Instructions.)

If the table is an internal table or ODBC database, type only its name. If it is a text file, type the complete path and name.

See also: Using tables to validate field values

Internal table

Select this when the table you specify is created in (or imported to) FORMS.

Text file

Select this when the table you specify is a text file. See Specifications for external files and tables for field validation.

ODBC connection

Select this when the table you specify is in an ODBC database. Fill in Data source, as well. See Specifications for external files and tables for field validation.

Active validation

See separate topic.

Store table internally

FORMS stores the table in main storage while Interpret is running. (If the table is in an ODBC database, only the handle is saved in main storage.)

This can speed up its operation, especially if you are using an internal table for active validation or an ODBC table for either normal or active validation.

Show candidates in Verify

Values from the table are available during verification. (Exception.) (Show me what it looks like.)

In this case, text files rather than internal tables are preferable when tables are large (more than 500 entries).

Each item in the Field validation group box works independently of the others, and each (except for the Must be filled in option) applies only to filled-in fields.

Validations on this level result in a field being saved in the database with the status Validation error if the field value does not fulfill requirements you specify.

Options for field definitions

Advanced options and validation routines

Validation rules

Demand fields

Set sum validation

Field status