Nested while loop

I have tried to create a nested while loop but the execution of only the inner loop is achieved successfully and outer loop counter is completely ignored. Can someone please help?

That’s a for each loop, but the concept would be similar.

@Shatakshi_Mishra can you give us an example of what you’re trying to achieve and we can give specific recommendations?

Hi @Shatakshi_Mishra,
Now you can take the nested While loop.

File : NestedWhileLoop.zip (2.4 KB)

Regards
Balamurugan.S

Hi!
I am trying to understand Uipath better.
I want to read the elements of each cell of an excel and compare them to cells of another excel. So i was trying to use nested while for the same. I tried using ‘read cell’ activity but i wanted to search other options as well.

Hello! Thank you so much for helping!
I tried a similar code but the outer loop’s counter is not getting executed.

first, use two read range activities to get two dataTables, let’s call them dt1 and dt2.
now, create the following structure:

for each row1 in dt 1{
–for each row2 in dt2
----if row1(x)=row2(y) then{
//your things}
} where x and y are the indexes of the columns

when i first started using uipath i’ve used the same technique. although it might not be the best one, it does its job pretty well. please notice that i’ve used row1 and row2 instead of the normal row to avoid confusion and you should do the same if you don’t want unexpected results.

Hi @Shatakshi_Mishra
If you possible can you send me the project file , that to investigate the problem.

Regards
Balamurugan.S

Thank you for the explanation!

excel_1.xlsx (10.7 KB)
Main3.xaml (13.0 KB)
project.json (326 Bytes)

Hi,
Can you check the sample Nested loop application that I have below attached.

NestedLoop.zip (11.1 KB)

Suggestions :
Best to use the For each row activity .

Regards
Balamurugan.S

Can you please send me an example of the same?
Sorry for the inconvenience.!