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 / Use condition based on...
Power Automate
Unanswered

Use condition based on previous step run

(0) ShareShare
ReportReport
Posted on by 20

Hi,

 

I need help in creating a condition based on the previous step run. If the previous steps fails, it needs to execute few set of steps and if no then it needs to execute different steps. 

 

But how can I add the condition based on the previous step and make it happen. Have attached screenshot for reference.

 

Thanks

 

ganeshn07_0-1686137191530.png

 

 

Categories:
I have the same question (0)
  • rzaneti Profile Picture
    4,241 Super User 2025 Season 2 on at

    Hi @ganeshn07 ,

     

    You can configure the 'run after' to set the actions that will be fired in case of a previous action fails. Here is an example.

     

    I have 2 variables: result (boolean) and number_var (integer). I will try to set a string value to number_var, which will make the action fails. In a future action, the result variable will be set as true if the number_var assignment succeed and as false if it fails:

    rzaneti_0-1686138545041.png

     

    After that, I will try to assign a string variable to numberic_var, which will result in a failure of the action. And after this assignment, I will create 2 parallel actions, one to set 'result' as true and other to set it as false:

    rzaneti_1-1686138868189.png

     

    As you may note, the arrow from 'Set variable 3' action is red and dashed. It happens because I reconfigured the run after from the action, making it run only if we have a failure in the previous action (Set variable). To configure it, you click in the 3 dots button, 'configure run after' and select 'has failed':

    rzaneti_2-1686139001870.png

     

    If you prefer, you can also select other options, like is skipped or has timed out. As for this use case we have different behaviors based on flow success, I unchecked the 'is successful' option.

     

    When I test the flow, it will run the 'Set variable 3' even in the case of failure in 'Set variable' action. Note that 'Set variable 2' action did not run, as the 'run after' is configured to be fired only if the flow succeed. Also, you may notice that even with this "successful" flow run, it will appears as "failed" in your run history. 

    rzaneti_3-1686139078132.png

     

    Let me know if it works for you or if you need any additional help!

     

    -------------------------------------------------------------------------
    If this is the answer for your question, please mark the post as Solved.
    If this answer helps you in any way, please give it a like.

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 538 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 405 Moderator

#3
abm abm Profile Picture

abm abm 252 Most Valuable Professional

Last 30 days Overall leaderboard