Loop Action—Setting Properties

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.

To set Loop properties

  1. From the Task Builder Available Actions pane, open the Loop folder and double-click the Loop action or drag it into the Steps pane.

  2. Do one of the following:

  3. Click the Advanced tab.

  4. 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.

  5. 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.)

  6. To set the Description tab properties, refer to Description Tab Options.

  7. To set the Error Causes and On Error tab properties, refer to Step Error Handling.

  8. When finished, click OK to save settings and close the properties dialog window.

To auto-indent after all steps are added

  1. 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.

  2. Click the Format button .

See Also

About Actions

Adding Task Steps

Loop Action