Iterator Outputs

Iterators produce Outputs that can be used as Inputs for Commands and Events. The Outputs produced vary depending on the Iterator type (List, Repeat Until). The below table outlines the Iterator Outputs that are available by type.

Output

Description

List

Repeat Until

Command Iteration/Group Iteration

Variable value of the current iteration being processed in the loop.

Y

Y

Index

Zero-based counter indicating the current iteration in the loop.

Y

Y

First Iteration

Boolean value specifying if the iteration being processed is the first in the loop.

Y

Y

Last Iteration

Boolean value specifying if the iteration being processed is the last in the loop.

Y

N

Total Iterations

Zero-based count of the total iterations to be processed by the loop.

Y

N

Basic Command Iterator

To use the iterator following these steps:

  • Select the Iteration tab

  • Enable the iterator function using the toggle.

  • Select the Modifier Type (List, Repeat Until).

    • If using List, set a static or dynamic list of elements. If a list is dynamic, then it will be a list output from a prior Command.

    • If using Repeat Until, specify the criteria for which the iteration should repeat.

  • Use any of the Command Iterator Outputs as an Input for any of the Command parameters.

In the example below, the Command iterator is configured with a fixed list where the iteration will loop over the three elements: apples, bananas, and oranges.

📓 Manually Entered Iteration Values

Be sure to hit the Enter key after inputting an iteration value.

Command Group Iterator

If a group of Commands needs to execute with a different set of values, then the Command group iterator can be used.

Do the following steps after a Command Group is created:

  • Add and edit a Command group.

  • Select the Iteration tab.

  • Enable the iterator function using the toggle.

  • Select the Modifier Type (List, Repeat Until).

    • If using List, set a static or dynamic list of elements. If a list is dynamic, then it will be a list output from a prior Command.

    • If using Repeat Until, specify the criteria for which the iteration should repeat.

  • Use any of the Group Iterator Outputs as an Input for one or more Command within the Group.

In the example below, the Command group iterator is configured to loop until the value of the Variable Counter is greater than four (4).

📓 Dynamic Iteration Values

Note that iterator values can also be dynamically driven from an external source such as a relational database or an external web service in JSON format. To configure this, please use the CSV to JSON Command in the JSON BizApp or the JSON Variable transformation if the list is less than a 1000 records. Info on these Commands may be found on the JSON Command Reference page.

📓 Learn more about Iterators

Use the Iterator section in the OneCloud Integration Studio Quick Start Guide.

Did this answer your question?