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.
The following example is a list of simple expressions containing prime numbers that are less than 10:
Description of the illustration dmn-list.png
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.
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].