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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Try-Catch into continu...
Power Automate
Answered

Try-Catch into continue with MainFlow

(0) ShareShare
ReportReport
Posted on by 39

Good Day,

 

I have completed my Flow in Power Automate Desktop and am now looking to implement a try-catch error block for error handling.

 

It should work as follows:

- An error occurs.
- The Try-Catch block triggers a Sub-Flow.
- The user can identify the cause of the error and rectify it. Afterwards, they are presented with a dropdown menu to select the step from which they wish to continue. It's important that the previous steps and variables remain unchanged.


I've made some progress, but I'm unsure about what to input in the 'if' functions. I tried initiating the subflow, but it doesn't return to the desired step in the main flow.

 

Your assistance would be greatly appreciated.

 

Best regards,

 

Screenshot.png

I have the same question (0)
  • Verified answer
    Agnius Bartninkas Profile Picture
    Most Valuable Professional on at

    You cannot really define the step for the flow to continue from dynamically. You will need to hard-code every possible option and have some form of stage functionality implemented.

     

    The way I would do this is more or less as follows.

     

    The main flow should be done within a WHILE 1 = 1 loop, so that it continues infinitely, until you tell it to stop. This way, if an error happens, you can start from the beginning.

     

    Then have an On block error to handle the catch part. And then have conditions for each step. If the stage is complete, the step should be skipped.

     

    Then, once all stages are completed, you can use Exit loop to stop looping.

     

    It should look somewhat like this:

    Agnius_1-1692965798619.png

     

     

    Make sure that your On block error action is set to call the sub-flow, as well as continue the flow run and go to the end of the block. This way, it will skip further actions on error and get back to the beginning of the loop.

    Agnius_2-1692965879047.png

     

    Then, your sub-flow should basically set the %Stage% variable to one step before the action that needs to be taken next, depending on the choice that the user made.

     

    So, when the flow exits the sub-flow, it will get back to the loop and proceed with the action the user selected.

    -------------------------------------------------------------------------
    If I have answered your question, please mark it as the preferred solution. If you like my response, please give it a Thumbs Up.

    I also provide paid consultancy and development services using Power Automate. If you're interested, DM me and we can discuss it.

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 525 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 324 Moderator

#3
abm abm Profile Picture

abm abm 232 Most Valuable Professional

Last 30 days Overall leaderboard