For Each

The tool For Each is a step that repeats a set of actions for each element inside a subflow. Now, learn how to add it to the canvas and how to configure its form.

Add For Each to the canvas

  1. Click the wrench icon with a plus sign icon from the editing menu on the left.

  2. Select the For Each to add it to the canvas. You can use the search bar search steps icon to find it.

  3. Drag to the For Each board the steps (except triggers) that will be part of the subflow.

You can add a For Each within another For Each. This way, your integration flow will process data in structures with nested loops.

The alert icon alert icon on the For Each board will only disappear if there are:

  • At least one step within the subflow;

  • The input connection, on the left;

  • The output connection, on the right.

alert for each

To remove steps from the subflow, without deleting them from the canvas, there are two buttons:

  • Detach: detaches a single step from the subflow. Select the step you want to detach and click the third button on the right.

  • Ungroup: ungroups all of the steps in the subflow and leaves the For Each board empty. Select the For Each board and click the third button on the right.

To delete For Each from the canvas, select it and click the trash can icon button. All of the steps in the subflow will be deleted and the connections removed.

To move a step between two For Each tools, you must detach it from the initial subflow. To do that, click X and drag it to the new subflow.

Configure the form

  1. Select For Each tool on the canvas.

  2. Click the pencil icon editing icon.

  3. Fill in the following fields:

    • Name: enter a unique name for the step For Each. Alphanumeric field that allows special characters and blank spaces, with a limit of 20 characters.

    • Variable List: list of variables that will be executed. The values must be an array (list). Alphanumeric field that allows special characters and blank spaces, with a limit of 1024 characters.

      By clicking the Properties icon list icon on the right, you can:
      a. Select previously registered variables.
      b. Create expressions using the Expression Builder.
    • Iteration Element: name of the structure that identifies the elements inside For Each. Alphanumeric field that allows special characters and blank spaces, with a limit of 250 characters. You can see the name registered in Properties or in the Data Mapping (FROM/TO) of the steps that are in the For Each subflow.

  4. Configure the Ignore Errors button: by default, the button is disabled and you can enable it.

    Enabled switch Disabled switch off

    Execution continues, even if there are errors in the process.

    Execution will be stopped immediately.

    The logs show the step with an error.

    The logs show the execution up to the last iteration.

    Steps after For Each will be executed.

    No step after For Each will be executed.

    In case your flow has a For Each within another For Each, the following rules apply to the Ignore Errors button:

    For Each 1 (outside) For Each 2 (inside) Result

    Ignore Errors disabled

    Ignore Errors disabled

    The flow is interrupted when there is an error.

    Ignore Errors enabled

    Ignore Errors enabled

    The flow is NOT interrupted when there is an error.

    Ignore Errors enabled

    Ignore Errors disabled

    Execution of the entire For Each 1 iteration (outside).

    Ignore Errors disabled

    Ignore Errors enabled

    The flow is NOT interrupted when there is an error.

  5. Click SAVE.

for each form
The amount of repetitions is determined by the amount of items in the array (list).

Expression Builder

The Expression Builder component allows you to create expressions with parameters and variables through functions and conditions available within the component. This allows you to adjust the expressions to meet your needs.

Follow the steps below to access the Expression Builder screen:

  1. Click the Properties icon list icon, to the right of the Variable List field.

  2. Next, click the expression icon icon in the upper-right corner.

expression builder for each

The Expression Builder screen contains the following sections:

  • Properties: shows data from previous steps and from the environment variables. Filter the attributes using the search field at the top of the section and then click the magnifying glass icon. You can select more than one attribute. When selecting it, the attribute will appear in the Expression field.

  • Expression: field to enter the input attributes or to create an expression by clicking the fx button button on the right. Only the Concat function is available to create the expression.

When selecting two or more attributes in the Properties field, you must create an expression.

To save the information, click CONFIRM.

Thanks for your feedback!
EDIT
How useful was this article to you?