To enable a command or command group in a chain to run repeatedly, use an iterator. With an iterator, you can run commands over a static or dynamic list of values—such as an output from an earlier command in the chain—and use the values as a property of the command.
Note: To convert an output from a relational database or external web service to a JSON array to use with an iterator, use the JSON connector's CSV to JSON command or a JSON variable transformation.
Step 1. Set Up the Iteration Values
- In the chain, select the command or group to repeatedly run, and click Edit .
- Under Iterations, enable Iterator
- For a static list, enter the values for each iteration, pressing Enter after each.
- For a dynamic list, click Variable , and select the command output with the values to use.
, and enter the iterations' values:
Step 2. Use the Iterations with a Command Property
To use the iterations as a command property's value, select Command Iteration or Group Iteration under Command Iterator or Group Iterator, respectively.