In the following example, we shall use the For each activity to go through a collection of even numbers and display each element one at a time.
Perform the following steps:
- Start with a Blank project in UiPath.
- Add a Sequence activity to the Designer panel.
- Next, add a For each activity within the Sequence and create an integer type array variable, x.
- In the default value of the variable, put in ({2,4,6,8,10,12,14,16,18,20}).
- Add a Write line activity to the Designer Panel (this activity is used to display the results).
- In the Text field of the Write line activity, type item.ToString to display the output:
-
Now, run the program. ...