CSM 10.4 Documentation

Home

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:

  1. Create an expression.
  2. In the Editor drop-down list, select Case.
    The Case Expression section opens.
  3. In the If condition is true section, select a type of If statement (Simple, Advanced, or Named expression), and then define its properties:
    1. Simple: Define an expression (example: Incident.Priority equals 1):
      1. Select a value from the Token Selector in the far left Value drop-down list (example: Incident.Priority).
      2. Select an operator from the Operator drop-down list (example: Equals).
      3. 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.

    2. Advanced: Select Edit to open the Custom Expression window, and then define a custom expression.
    3. Named Expression: Select the ellipsis button Ellipses Button to access the Expression Manager, and then select a stored expression or create a new expression.
  4. In the Then assign this value section, define the Then value (example: Alert - High):
    1. Value: Select a value from the Token Selector.
    2. Value is a color: Define a color value:
      1. Select the Value is a color check box.
      2. Select the Bulk Apply Theme button 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.

  5. (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).
  6. Define a default value:
    The expression displays this value if none of the defined cases are true.
    1. Select the Default: empty row in the Cases pane.

      The Then assign this value section opens.

    2. Repeat steps 4a - 4b above.

      The default Then value displays in the Cases pane.

  7. Select Save.

Was this article useful?