The Loop List Control action is used to loop through a list control, such as a Windows Explorer file list, and populate a variable with the items on the list. This action is used to perform some action on a group of items listed in a window.
The list control must be a standard Windows list control. Some programs may have list structures that look and function in a similar way, but if it is not a standard Windows list control, it will not work with this action. The window containing the list control must be open when the step runs.
When the Loop List Control step is created, an End Loop step is created automatically. Place the steps to be performed on the list items between the Loop List Control 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 List Control action or drag it into the Steps pane.
In the Populate variable with item text box, select the variable to populate.
Open the window that contains the control, and display the list control you want to use.
Drag the AutoMate icon from the Loop List Control dialog box into
the list control.
A black outline appears around the list control when it is selected. When you release the mouse button, the dialog box is automatically populated with the list control specifications.
To change any of the list control specifications, click the Edit button and edit the specifications as needed.
To sort or limit the output from the list, click the Advanced tab and enter the properties as follows:
Use either Include items or Exclude items to enter all or part of the list items that you want to include or ignore. If you make entries in the Include items box, all items that do not match your entries will be ignored. If you make entries in the Exclude items box, only the specified items will be ignored and all others will be included. You can use asterisk (*) and question mark (?) as wildcard characters.
To populate a dataset with the list control data,
select Create and populate dataset and
enter a name for the dataset in the box. (Dataset names must be alphanumeric,
begin with a letter, and contain no spaces.)
The dataset fields will match the columns of the list control, with an additional field for the current index.
If you want the items looped in ascending or descending alphabetical order, make your selection in the Sorting box. By default items are looped in the order they appear in the list.
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
Loop List Control Action