Create Lists

A list notation is a vertical list of elements, where each element is an independent logical notation. The output of a list notation contains outputs of all its elements. You can also invoke the output of a particular list element from another decision.

To create a decision with the list notation:
  1. Add a new decision element to the model.
    1. On the Diagram palette, under Decisions select List and drag it onto the canvas.
    2. Double-click the element to edit its logic. You can also edit the element's logic from the Decision Properties pane; click the three dots on the element, then select Edit to open the Decision Properties pane. In the Decision Properties pane, click Edit Edit icon next to the Name field.
    An empty list is created.
  2. Click Add Item Add icon to create a new list entry. An entry is created with the expression notation selected by default.
  3. To change the logical notation for an entry, click Change Value Change Value icon for the particular entry. Select a different notation from the available options.
  4. In the entry field, configure the logic for the selected notation. You can use input variables or built-in functions to define the logic.
  5. Repeat steps 2 to 4 to add another entry into the list.
  6. Changes you make within the decision model are automatically saved and validated from time to time. Errors and warnings, if any, are displayed within the decision panel.
    To delete a list entry, click Change Value Change Value icon for the particular entry and select Delete.

Note:

  • If you add a function as one of the list entries, then the list notation as a whole doesn’t return a result. However, you will still be able to invoke results of other list entries throughout the decision model.

  • According to the FEEL syntax, you can also define horizontal lists in expression fields across all notations. For example, a list of all prime numbers less than 10 can be defined as [2,3,5,7].

The following example is a list of simple expressions containing prime numbers that are less than 10:



In a list of n elements, use List_name[n] to invoke the nth element from the beginning of the list, and use List_name[-n] to invoke the nth element from the end of the list. In this example, to invoke the list entry of 2, you can either use Prime Numbers[1] or Prime Numbers[-4].

You can also use suitable built-in list functions on a decision containing a List notation. For example, the following Expression decision returns the sum of all items in the Prime Numbers decision.