CHAPTER 8 Displaying and Validating Data
DataWindow Designer User’s Guide 261
❖ To specify a validation rule for a column in the DataWindow painter:
1 In the DataWindow painter, select View>Column Specifications from the
menu bar.
The Column Specification view displays.
2 Create or modify the validation expression. To display the Modify
Expression dialog box, display the pop-up menu for the box in which you
want to enter a Validation Expression and select Expression. Follow the
directions in "Specifying the expression" next.
3 (Optional) Enter a string or string expression to customize the validation
error message.
For more information, see “Customizing the error message” on page 260.
4 (Optional) Enter an initial value.
Used for current columns only
If you create a validation rule here, it is used only for the current column
and is not saved in the extended attribute system tables.
Specifying the expression
Since a user might have just entered a value in the column, validation rules
refer to the current data value, which you can obtain through the
GetText
DataWindow expression function.
Using
GetText ensures that the most recent data entered in the current column
is evaluated.
DataWindow Designer does the conversion for you
If you have associated a validation rule for a column in the Database painter,
DataWindow Designer automatically converts the syntax to use
GetText when
you place the column in a DataWindow object.