The COLOR WHERE attribute defines a condition to set the foreground color dynamically.


COLOR = color-name [...] WHERE bool-expr
  1. color-name can be BLACK, BLUE, CYAN, GREEN, MAGENTA, RED, WHITE, or YELLOW.
  2. color-name can also be an intensity keyword: REVERSE, LEFT, BLINK, and UNDERLINE.
  3. bool-expr defines a boolean expression with a restricted syntax.


The attribute COLOR WHERE defines a conditional color. The color will be applied if the condition is true.

The condition in COLOR WHERE can only reference the field for which the attribute is set.


EDIT f001 = item.price, COLOR = RED WHERE f001 < 0;
Note: With form fields such as EDIT, BUTTONEDIT the color will be applied when leaving the field. The color will not change while editing the value.