Conditional Expression Builder

The Conditional Expression Builder allows you to associate an expression that references one or more fields in the table with a display statement (in Xdialog syntax) that may contain static text, text computed from table fields, any type of font formatting, buttons, and images. You compose the display statement interactively. You have have multiple expressions that apply different display statements for different conditions. Alpha Five uses the first condition that satisfies the expression and ignores any other conditions that may also satisfy the expression.

For example, if you have the following expressions and the lastname field contains the value "Pierce".

Expression

Action

Result

lastname < "b"

Display field contents in blue.

Condition is ignored

lastname < "m"

Display field contents in green.

Condition is ignored

lastname < "s"

Display field contents in yellow.

The data is displayed yellow.

lastname >= "s"

Display field contents in red.

Condition is ignored

You do not need to know anything about Xdialog to use this utility. [Picture]

The conditions shown above produce the following browse display. [Picture]

To create a condition and a display statement:

  1. Click Add to create a new condition.

  2. Enter the expression in the Expression control. You may click to use the Expression Builder to compose the expression. This expression must return a logical value (TRUE or FALSE).

  3. Click Edit Settings to display the Advanced Text Properties dialog to define the display statement.

  4. Repeat steps 1 to 3 for each additional condition that you want to create.

  5. Click OK to save your inputs and return to the calling dialog.

Supported By

Alpha Five Version 8 and Above

Limitations

Desktop applications only.

See Also