The Loop action is used to cause a series of steps to be repeated a specified number of times. You specify either a starting and ending count or a number of times to loop. The action includes the option to populate a variable with the loop count.
When you create a Loop step, an End Loop step is created automatically. Place the steps that you want to repeat between the Loop step and the End Loop step. The steps within the block should be indented for visual clarity.
From the Task Builder Available Actions pane, open the Loop folder and double-click the Loop action or drag it into the Steps pane.
Do one of the following:
Select Loop a number of times and enter the
number in the Total loops box.
Select Loop through a range and enter a Starting index and an Ending index.
Click the Advanced tab.
If you want to increment the loop count by something other than one, select Increment by step and enter the increment value. For example if you enter 2 and you have a starting index of 1 and an ending index of 6, there will be three loops, and the index counts will be 2, 4, and 6.
To populate a variable with the loop count, select Populate variable with index count and then select the variable from the drop-down list. (The variable must be created in an earlier step using the Create Variable action.)
To set the Description tab properties, refer to Description Tab Options.
To set the Error Causes and On Error tab properties, refer to Step Error Handling.
When finished, click OK to save settings and close the properties dialog window.
In the Task Builder Steps pane, hold down SHIFT and click the first and last steps in the block so that the complete block of steps is selected.
Click the Format button .
Adding Task Steps