Looping through lists
In this section, we will be looping through the lstSourceList
list variable. As we go through the list, a variable will be needed to store the current name within the list. You created a variable for this earlier called strFullName
.
To loop through a list, we must use the Loop action. Let's continue with the walk-through and apply the Loop action:
- Drag the Loop action from the Loop package just below line 6.
- Set the following properties for the Loop action on line 7:
Loop Type: Iterator
Iterator: For each item in the list
list: lstSourceList - List
For: All items in the list
Assign the current value to variable: strFullName - String
The properties should look like this:
- Click on Save.
- All the actions that need to be performed within the loop are represented by being indented within the Loop action. Let's align our comments (lines 8 to 12) so that they are within the loop. This can be done by...