Repeat step
The Repeat step is a loop that may run 0 or more times, depending on the condition specified. It is generally used for the extraction of transactional data; see Extracting transactional data.
Repeat steps do not automatically move the pointer in the source file. Therefore, when adding a Repeat step, a Goto step that moves the cursor is inserted automatically inside the loop to avoid an infinite loop, except with XML and JSON data.
When you select a node in an XML file and add a Repeat step on it, the Repeat step will automatically loop over all nodes of the same type on the same level in the XML file.
The same applies to JSON files. When you select an element in a JSON file and add a Repeat step on it, the Repeat step will automatically loop over all elements on the same level in the JSON file.
Tip: To break out of a loop and immediately jump to the next task following the current loop, use an Action task and set its action to Break out of repeat loop.
Adding a Repeat step
To add a Repeat step:
-
On the Steps pane, select the step after which to insert the Condition step.
-
Make sure that the cursor is located where the extraction loop must start. By default the cursor is located at the top of the page or record, but previous steps in the extraction workflow may have moved it down. If necessary, add a Goto step (see Goto step).
Generally this step can be skipped when the data source is an XML file or JSON file. -
Add the Repeat step: select data in the line or row where the loop must end, or select the node/element. Then either:
-
Right-click on it and select Add Repeat.
-
Right-click the Steps pane and select Add a Step > Add Repeat.
-
Select Steps > Add Repeat Step from the menu.
-
-
Make the required settings on the Step properties pane. See: Repeat step properties.
For more detailed instructions per file type see Extracting transactional data.
Configuring a Repeat step
For information about how to configure the Repeat step, see Repeat step properties.
How to use it in an extraction workflow is explained in the topic: Extracting transactional data.