Field_Value_Check - DataDictionary

Configures a check-type validation for a table column

Type: Property

Access: Write-Only

Data Type: String

Parameters: Integer iField

ParameterDescription
iFieldNumber of the column in the table


Syntax
 Property String Field_Value_Check

Write Access: Set Field_Value_Check iField to StringVariable/Value


Description

Field_Value_Check is used when the list of valid column values is limited to a static, small set of simple values. These samples are identified in a "check" string. This consists of a list of valid values separated by the | symbol. For example, the choices A, B and C would be represented by the check string A|B|C. The choices CA, FL, and TX would be represented by the check string CA|FL|TX.

The validation is performed after the user has entered data into the column's data entry form. If the validation fails, then the user is prohibited from leaving the form. (The user may still exit the form by clicking elsewhere on the screen with the mouse). The validation is also performed when a record is saved. If the validation fails, the save is aborted.

In addition to being used for validation, these values may also be used with combo-box entry items. If a dbComboForm is assigned to a column using check values, each value in the check string will be loaded into the combo list.

Sample

Set Field_Value_Check Field Customer.State to "CA|FL|NY|AZ"


The Customer.State example above is probably not a good usage of this validation method. Adding new states to this list requires program changes, and the string may quickly become too large to be practical. In such a case, you will want to use a validation table to provide the values.

When a validation error occurs, the error number and text specified for the column in the Field_Error property are used to report an error. If no text was defined, a standard check-error text will be reported.


The check validation is limited. A more flexible and reusable way of specifying a list of valid entries is to use a validation table (see Field_Value_Table) .

Notes

The length of each item listed must be the same as the length of the column and padded with spaces as needed. For example, if a column is 6 characters wide, all values listed must be padded with spaces to fill the entire 6 characters. For example: "Red |Orange"

See Also

Defining Data Dictionary Field Attributes | Field_Value_Range | | Field_CheckBox_Values