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

@rishipatel312

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.

ForEachActivity.zip (2.0 KB)

WhileActivity.zip (11.0 KB)

Regards,
Karthik Byggari

2 Likes

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