cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
New Member

(Nested Loop) Apply to Each loop is being skipped

Hello,

I am struggling to figure out why "apply to each 2" and the actions below that are being skipped after the 2nd time it loops (and beyond). 

 

The "Apply to Each 2" loop is being skipped the 2nd time around and beyond. Would anyone have any idea why?

 

Note: "Apply to Each" and "Appy to Each 2" is inside "Apply to each 3"

 

 
 

1.png2.png3.png4.png5.pngThis is the loop that is being skipped (2nd time around and beyond) And the actions below this.This is the loop that is being skipped (2nd time around and beyond) And the actions below this.7.pngThe "increment variable" action is part of the previous image.The "increment variable" action is part of the previous image.here is a sample of the results. Notice on the 2nd loop and beyond I do not get step 2 / 3 emails. Furthermore, the array is not clearing at the end of the loop. Instead, new numbers keep being added. (The goal of the flow is to find the highest number in the array)here is a sample of the results. Notice on the 2nd loop and beyond I do not get step 2 / 3 emails. Furthermore, the array is not clearing at the end of the loop. Instead, new numbers keep being added. (The goal of the flow is to find the highest number in the array)

 

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support
Community Support

Hi @Thalys,

 

The Apply to each 2 may not skip but it skipped the Condition action, it may be caused by the condition3 action not go to the branch you want.

I don't know what you want, please make sure the logic of your Flow is correct. You could do more tests, and make sure the logic could run through.

 

Best Regards,
Community Support Team _ Lin Tu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
Community Support
Community Support

Hi @Thalys,

 

The Apply to each 2 may not skip but it skipped the Condition action, it may be caused by the condition3 action not go to the branch you want.

I don't know what you want, please make sure the logic of your Flow is correct. You could do more tests, and make sure the logic could run through.

 

Best Regards,
Community Support Team _ Lin Tu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Yep. You were right. In that condition I would assume the first element in the array as "max". I also have a counter so I can go through each element in the array. The problem was I did not reset the counter once the loop was done. 

Helpful resources

Announcements
New Super Users

Meet the Power Automate Super Users!

Many congratulations to the Season 1 2021 Flownaut Crew!

New Badges

New Solution Badges!

Check out our new profile badges recognizing authored solutions!

MPA Community Blog

Power Automate Community Blog

Check out the community blog page where you can find valuable learning material from community and product team members!

Users online (63,665)