The List variable can be used to store groups of Boolean, String, or Numeric data types within a Ruleset.
- Selectively extract values for use in rules in the Ruleset.
- Called as a looping construct in a Composite Rule.
In conjunction with this variable type, several Ruleset Actions in the Collection category are available.
Creating a List Variable
- Click Add Variable.
- Type the name you wish to give the variable.
- Select List from the Type drop-down.
- Select the Element Type. Choices are Boolean, String, and Number.
- Click OK to complete this task.
Result: The new variable now appears as an option in the Variables pane.
This simple example shows how you might use several of the Actions with the List variable type.
The first Rule uses the CreateList Action, which uses the List-type variable that we already created – ListField.
The next Rule - a For Each Composite Rule - shows that it contains five child rules. All but one are Move rules; the second Rule down is another Collection Rule – ListAdd, which in this case will add an element (“Field 2”) to the “ListField” list.
Another Composite Rule (For each ListField….) creates a new record for each element in the List. In this case we only have one element, “Field 2”. The output below shows how these rules could execute.
While this example may be simple, it demonstrates the two use cases noted above.