Define a Case Expression
A Case expression works as a group of if-then-else expressions that are applied together against one field (example: If the Incident Priority equals 1, then apply the Alert - High color to the Priority alert bar).
To define a Case expression:
- Create an expression.
- In the Editor drop-down list, select Case.
The Case Expression section opens. - In the If condition is true section, select a type of If statement (Simple, Advanced, or Named expression), and then define its properties:
- Simple: Define an expression (example: Incident.Priority equals 1):
- Select a value from the Token Selector in the far left Value drop-down list (example: Incident.Priority).
- Select an operator from the Operator drop-down list (example: Equals).
- Select a value from the Token Selector in the far right Value drop-down list (example: 1).
The If statement displays in the Cases pane.
The If statement ends with the term empty because the Then statement has not been defined.
- Advanced: Select Edit to open the Custom Expression window, and then define a custom expression.
- Named Expression: Select the ellipsis button
to access the Expression Manager, and then select a stored expression or create a new expression.
- Simple: Define an expression (example: Incident.Priority equals 1):
- In the Then assign this value section, define the Then value (example: Alert - High):
- Value: Select a value from the Token Selector.
- Value is a color: Define a color value:
- Select the Value is a color check box.
- Select the Bulk Apply Theme button
, and then select an existing theme or color or create a new color.
The Then value displays in the Cases pane.
- (Optional) Add related expressions to the Cases pane (example: If the Priority equals 2, then apply the Alert - Medium color to the Priority alert bar).
- Define a default value:
The expression displays this value if none of the defined cases are true.- Select the Default: empty row in the Cases pane.
The Then assign this value section opens.
- Repeat steps 4a - 4b above.
The default Then value displays in the Cases pane.
- Select the Default: empty row in the Cases pane.
- Select Save.