How to utilize For Loop and While Loop

Can someone show me an example of flowing through for loops and while loops please?

1 Like


Welcome to the UIpath Community.

For Each - just we have to pass array of data to itreate it.

While - it will iterate the data until the condition is true.

1 Like

Here attaching the sample workflows to understand for each and while loops.

For each loop - to iterate x number of times.

while loop - iterates until the condition becomes false. (2.0 KB) (11.0 KB)

Karthik Byggari


Hi Buddy @rishipatel312

Welcome to UiPath Community

So there are two for loops and a while loop in UiPath
Two for loops – For each row loop and For each loop
Example of while loop
Example of For each row loop

Example of For each loop

Hope this would help you buddy
Cheers @rishipatel312