web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / How to restart for eac...
Power Automate
Answered

How to restart for each flow on error Power Automate Desktop

(0) ShareShare
ReportReport
Posted on by 30

I have a for each action in my power automate desktop flow. I am needing to incorporate an On error on action within the for each action. I am wanting the On Error to restart at the For each action. The On error will be within the Subflow. If it errors out, I want the flow to go back to step 19 and go to the next account number. Thanks for any help with this! 

 

rhawkins10701_0-1651206799487.png

 

  • VJR Profile Picture
    7,635 on at

    Hi @rhawkins10701 

    Cant see at which line the "End" statement of the For each loop is.

     

    Add a Label just before the "End" statement. 

    Then in your subflow, the On error has an option called "go to label". So when it encounters an error it will jump to the label which is your next iteration of the For each loop.

     

    VJR_0-1651207411030.png

     

     

  • rhawkins10701 Profile Picture
    30 on at

    Hey @VJR ! I created the label but when I go to on error I do not see my created label. Am I doing this wrong? 

     

    rhawkins10701_0-1651208045872.png

     

    rhawkins10701_1-1651208062311.png

     

  • rhawkins10701 Profile Picture
    30 on at

    I noticed when I use the on error on an action within the subflow it does not show my label. But if I use an action in my main flow I see the label.

  • Verified answer
    VJR Profile Picture
    7,635 on at

    So new lesson learnt today - Variables are of global nature in PAD and Labels are not 😊.

    You can use set variable instead.

    In the on Error in the subflow, set a variable like varFlag = 1. Depending on how you have designed the subflow you might also have to select "go to end of block"

    Then in the Main flow add your "If" in such a way that it bypasses everything and goes to the End statement

     

     

    For each 

     

    run subflow ("")

    If varFlag= 0

     do something

    End if

    End

     

    so If you set varFlag to 1 in Subflow, it will not go inside the IF and directly go to the End which will be your next iteration of the For loop.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Automate

#1
11manish Profile Picture

11manish 233 Super User 2026 Season 2

#2
David_MA Profile Picture

David_MA 227 Super User 2026 Season 2

#3
Mohsin Ali Profile Picture

Mohsin Ali 178

Last 30 days Overall leaderboard