For Each

When to use For Each

This activity helps you iterate a sequence for each item in a specified values collection.

Figure 1

Activity Name

Picture

For Each

a                                             

Technical Reference

Figure 1.1

p 

S.no

Description

1

Display Name property shows the action that the activity performs in the workflow

2

Specify the type argument (datatype)

3

Specify the collection of items to iterate over the loop.

t      Condition should be specified as Boolean.
               Note: While iterating the excel data, enter values as "Variable.AsEnumerable()"

Scenario

Assume you want to close an active application when the count of the iteration is 5.

Illustration

 a Activity: The While activity executes the sequence of activities in the body once the specified condition is evaluated to be true.

Step 1  Drag a While activity and specify the condition in the properties section.

  • Define a variable count that holds the value of the iterations performed, which can be incremented using an assign activity
  • Drag a close application activity and select the application that needs to be closed if the validated condition is evaluated as true.

Figure 1.2

1.12

Figure 1.3

 1.13

 

v4.0.0