Specifications

CHAPTER 23 Operators and Expressions
Users Guide 617
In filters
Filter expressions are boolean expressions that must evaluate to true or false:
Table 23-3: Using expressions with filters
In validation rules for
table columns
Validation rules are boolean expressions that compare column data with values
and that use relational and logical operators. When the validation rule evaluates
to
false, the data in the column is rejected.
In the Form painter When you specify a validation rule in the Form painter,
you should validate the newly entered value. To refer to the newly entered
value, use the
GetText function. Because GetText returns a string, you also need
a data conversion function (such as
Integer or Real) if you compare the value
to other types of data.
If you include the column name in the expression, you get the value that
already exists for the column instead of the newly entered value that needs
validating.
In the Database painter When you specify the validation rule in the
Database painter, you are defining a general rule that can be applied to any
column. Use
@placeholder to stand for the newly entered value. The name
you use for
@placeholder is irrelevant. You can assign the rule to any column
that has a datatype appropriate for the comparison.
When you define a form, a validation rule assigned to a column is brought into
the form and converted to form syntax.
@placeholder is converted to GetText
and the appropriate datatype conversion function.
Expression Description
Academics = "*****" AND
Cost = "$$$"
Displays data only for colleges with both a 5-star
academic rating and a $$$ cost rating
Emp_sal < 50000 Displays data for employees with salaries less
than $50,000
Salary > 50000 AND Dept_id
BETWEEN 400 AND 700
Displays data for employees in departments 400,
500, 600, and 700 with salaries greater than
$50,000
Month(Bdate) = 9 OR
Month(Bdate) = 2
Displays data for people with birth dates in
September or February
Match ( Lname, "[ ^ABC ]" ) Displays data for people whose last name begins
with A, B, or C