Create If-Then-Else Statements

An If-Then-Else expression is a logical notation that evaluates a test statement. It executes a primary expression if the test is true and a secondary expression if the test is not true. You can also introduce additional test statements using the Add Else If button.

To create a decision with the If-Then-Else logic:
  1. Add a new decision element to the model.
    1. In graph view, click Expand Expand/Collapse icon next to Decision on the diagram palette. Select If-Then-Else and drag it onto the canvas. Double-click the element to edit its logic. You can also edit the element's logic from the properties pane; select the element, then select Open Properties Open Properties icon, and in the properties pane click Edit Edit icon next to the Name field.
      Click Close Close icon to return to the canvas.
    2. In list view, click Add new decision Add New Decision icon in the Decisions bar and select If-Then-Else from the Create Decision window. See Adding and Ordering Decisions.
  2. In the if expression field, press Ctrl+Space to view an auto-suggest menu. You can use any decision outputs, variables, functions, and keywords listed in the menu to define expressions in if, then, and else fields. Use the FEEL syntax to define expressions. See Understanding FEEL.
  3. If necessary, change the logical notations for then and else fields to create a nested logic. All fields have the expression notation selected by default. Click Change bodyChange body icon and select a different notation from the available options for a particular field. Configure logic for the selected notation.
  4. Additionally, you can cut or copy a notation from one field and paste it into another field using options available in the Change body menu.
  5. After the decision logic is complete, click Save to save and validate changes manually. Changes you make within the decision model are also automatically saved and validated from time to time. Errors, if any, are displayed within the decision.