Field value matching

Field value matching enables you to specify matching output values to various input values.

Syntax: FIELD ? ValueList : DisplayList

FIELD is any variable or file field surrounded by brackets, for example, [$x], [name], and so forth.

ValueList and DisplayList are lists of comma-separated values

Use field value matching

Setting the color of a label to change based on the value of a severity field

The severity is specified in an edit field whose input is $severity. You set the Color Condition of the label as follows:

[$severity]? "sev1","sev2","sev3" : 1,7,2

This statement tells the label to do the following:

  • Use a color value of 1 (red) when $severity="sev1"
  • Use a color value of 7 (yellow) when $severity="sev2"
  • Use a color value of 2 (green) when $severity="sev3"

Specify a value to use if no match is found

[$severity]? "sev1","sev2","sev3" : 1,7,2, 0

This tells the system to use color 0 (black) if $severity is none of the listed "sev" values.

Note: The $severity field must have been assigned as input to at least one field on the screen.