Skip to content

Loop Component

Component

Loop Component

Components containing operations that will be looped will be connected to the Loop.

Once the execution of the loop ends it exits on the connected Default path.

Overview

A loop allows you to repeat a set of activities until it is deemed complete.

Following are the only components that can be used withing the Loop path:

  • Assignment
  • Database
  • Decision
  • HTTP Request
  • Email
  • SMS
  • PDF

Some of the use cases of Loop component include,

  • Traverse a table which has an email column and send emails to all
  • Traverse a table and copy the each and every row data to a data table
  • Traverse a table and start a sub-workflow for each row
  • Traverse a table, run conditions for values in a row and then execute other operations based on the conditional match.

You can loop through the:

  1. Rows of a form table
  2. Rows of a Data table
  3. JSON Array returned from an HTTP request

Example

Figure 1 - Loop form table

Employee IDSalary
001050,000
001555,000
002348,000

Figure 2: Employee Salaries

Figure 1 portrays an example of looping through data contained in a form table (Figure 2) with Employee IDs and, Salaries. The database operation inserts the table rows.

Usage

The loop will contain two Source Types under the General Tab:

  1. Form table - to loop operations for form table data
  2. Operation - to loop operations for database data or HTTP arrays

Loop with Form Table

Watch: How to insert the form table data into a Data Table.

Figure 3 General Tab - Loop  Form Table Data

An Example of Creating Variables and Creating an Assignment

Creating Variables and Assignment

  1. In order to capture the form table data, cell values of a row have to be assigned to Variables under Properties . Navigate to .
  2. Create Variables for each form field. Example

3. An assignment has to be created in order to assign the Table fields to the Flow variables (i.e. Variables you created in Step 1) under Design Flow Properties . Navigate to .

4. Type a name and hit Enter on your keyboard .

5. Under Field Assignment click .

6. Under the Destination column select Flow Variable from the drop-down and select the Variable Name from the adjacent drop-down. Example:

7. Under the Source column Select Form Field from the drop-down and select the Form Field name from the adjacent dropdown. Example:

8. Drag a Loop Component to the canvas and link the relevant components. Click on the loop to configure the loop. Under General, select Source Type as Form table.

9.Select the Assignment that was created at Step 4, as the Operation Value. See Figure 3

Loop with Data table or HTTP

Figure 4