Add a Loop

You can loop through the items within a list in a data object using the Loop node in your workflow.

When you add a Loop node to your workflow and select a list within a data object variable, map the fields within it to variables (supported within Quick Apps) and then create a task each for when an item is found and when no more items are found, the following elements are added along with the Loop node:

  • Index and row found variables are auto-created and mapped.

  • Decision for the row found is added with True path and False path.

  • True path is linked to the task for when an item is found and then looped back to the Loop node.

  • False path is linked to the task for when there are no more items.

  1. Click below the Start node or any other node.

    The Add activity dialog box is displayed.

  2. On the Type list, select Loop. (Default:Task)
  3. By default, the Title is displayed as activity type. You can change the title as needed.
  4. On the Data object list, select a data object variable from an existing list.

    Alternatively, create a new variable if the required variable is not available. Click and in the New dialog box, create variables as needed. See Create variables.

    When you are creating the variables, use the Loop as title and the variable name. For example, LoopIndex and LoopRowFound.

    The "Save data object fields to" for the selected data object variable appears.

  5. You can map the fields within it to the variable using Field and Save to options.

    If the required variable is not available, you can create a new variable using .

  6. To set the true path to a task when an item is found, in the Item found go to perform the following steps:
    1. On the Type list, select Task.
    2. In the Name field, a default name for the activity appears. You can modify the name as needed.
    3. Optional. Enter a Description for the node, such as "When cost is > 500".
  7. To set the false path to a task when no more items are found, in the Go to when no more items found perform the following steps:
    1. On the Type list, select Task.
    2. In the Name field, a default name for the activity appears. You can modify the name as needed.
    3. Optional. Enter a Description for the node, such as "When cost is < 500".
  8. Click Add.