Exit from for each loop if specific condition is true

Hello,

I have problem with one project I’m making. I have extracted data table from website and I need to go through it as long as correct contract number has found. It can be the first number on table or it might not be on the table at all.

How to exit from this for each -loop after ‘contractOK = True’? Now it’s continuing to next row where contractOK gets value false. That cause problem on next step which I need to do something only if correct contract number is not found at all from the table.

Thank you in advance!

@Jenny1
for stoping the loop use the break activity

I would suggest to filter the datatable in advance, so the unneeded loops can be avoided and it can be detected if contractNo is present or not

Thanks a lot! I tried to add break inside new if, but now I replaced continue with break and it worked as planned. I knew there was some small think I need to change, but somehow I couldn’t figure it out.

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.