A validation rule is a boolean expression. InfoMaker applies the boolean expression to an entered value. If the expression returns TRUE, the value is accepted. Otherwise, the value is not accepted and an error message displays.
You can use any valid InfoMaker expression in validation rules.
Validation rules can include most InfoMaker expression functions. InfoMaker expression functions are displayed in the Functions list and can be pasted into the definition.
For information about these functions, see Chapter 24, “DataWindow Expression and InfoMaker Functions.”
Use the notation @placeholder (where placeholder is any group of characters) to indicate the current column in the rule. When you define a validation rule in the Database painter, InfoMaker stores it in the extended attribute system tables with the placeholder name. At runtime, InfoMaker substitutes the value of the column for placeholder.
The @col can be easily used as the placeholder. A button in the Paste area is labeled with @col. You can click the button to paste the @col into the validation rule.
For example, to make sure that both Age and Salary are greater than zero using a single validation rule, define the validation rule as follows:
@col > 0
Then associate the validation rule with both the Age and Salary columns. At runtime, InfoMaker substitutes the appropriate values for the column data when the rule is applied.