Help files

For Each

A “For Each” loop, iterates through every item of a list or data table, and stores the current item in a variable. This kind of loop is extremely useful when you do not know or you do not need to know the number of the iterations that will be needed, but you do want to iterate through every item of a list (or or row of a data table) and use each one of them in an action (or a series of actions).

Usage Examples: There are plenty of situations that you may need to use a “For Each” loop:

If you want to check which of the text files that are contained in a list have a specific phrase in it, or if you need to use each data row’s contents to fill in a web form, you will have to use it. Basically, if you use the words “For Each” when you are describing the task that you need to automate, you will most likely have to use this action.

Also if you choose to read a text file as a list where each item of the list will be an item, you can use a "For Each" loop in order to iterate through each line and apply some actions on it.

loops3.png