With two nested for each loops, how do I break the second loop and return to the first one?

Greetings,

In my automation I have two for each loops, with the second one being nested in the first loop.

It looks as such:

Please ignore any of the assigns/logic as this is just an example made to demonstrate my problem. In the second loop, based on our IF condition we will decide to break that loop and return to the first loop, and then go back into the second loop.

However, what’s happening is when I use the Break activity it is not returning to the first loop. Any advice?

@tom_mccaffrey Did you check does dt_Numbers has any data to loop once it breaks the inner loop

Hello @tom_mccaffrey

The logic which you have written should work. But dt_Even=“This is an Example”.

What does this mean? Here your inner loop will directly exit and move to parent loop. Also, what it the variable type of dt_Numbers? Is it an array?

Hi @tom_mccaffrey,

The break activity should satisfy your request. Is it possible to share test activity?

Regards,
MY