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

Action Status extraction from previous action

Is it possible to extract an action status from any of the previous actions completed? 

 

What I would like to do is set a variable only once a scope action has failed, however, I currently have several branches, 

 

Typically I would do this by creating one parallel branch and then having an error handling loop, 

 

But since you can't have indented parallel branches that approach goes out the window (as far as I know anyway)...

 

So my question is, would it be possible to set a variable based on a previous action's result i.e "failed", "succeeded" or "canceled"?

 

Or similar to how in python you can "Try" or even pass on a loop should a condition fail, you can still return variables out of the loop, Im applying that logic but am not sure how to proceed. 

 

Appreciate any feedback on this!

 

Image of my flow:

 

kevincayouette_0-1641844977332.png

 

kevincayouette_1-1641845080123.png

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Expiscornovus
Super User
Super User

Hi @kevincayouette,

 

You could use the actions function and retrieve the status property value. Make sure you configure run after on the set variable action.


Below is an example:

actions('HTTP').status

 

actions_status.png

 

When you run it you should get Failed.

actions_status_failed.png



Happy to help out! 🙂

Interested in more #PowerAutomate #SharePointOnline or #PowerVirtualAgents content?
Visit my blog, Subscribe to my YouTube channel or Follow me on Twitter


View solution in original post

3 REPLIES 3
Expiscornovus
Super User
Super User

Hi @kevincayouette,

 

You could use the actions function and retrieve the status property value. Make sure you configure run after on the set variable action.


Below is an example:

actions('HTTP').status

 

actions_status.png

 

When you run it you should get Failed.

actions_status_failed.png



Happy to help out! 🙂

Interested in more #PowerAutomate #SharePointOnline or #PowerVirtualAgents content?
Visit my blog, Subscribe to my YouTube channel or Follow me on Twitter


kevincayouette
New Member

Thank you! Im still learning and turns out it was just starring me right in the face. 🙂 

Expiscornovus
Super User
Super User

Hi @kevincayouette,

 

No problem, I am also learning new stuff every single day.

 

Btw, actions is definitely one of the lesser known functions in the expression language out there 😁



Happy to help out! 🙂

Interested in more #PowerAutomate #SharePointOnline or #PowerVirtualAgents content?
Visit my blog, Subscribe to my YouTube channel or Follow me on Twitter


Helpful resources

Announcements
Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

Difinity Conference 2022

Difinity Conference 2022

Register today for two amazing days of learning, featuring intensive learning sessions across multiple tracks, led by engaging and dynamic experts.

European SharePoint Conference

European SharePoint Conference

The European SharePoint Conference returns live and in-person November 28-December 1 with 4 Microsoft Keynotes, 9 Tutorials, and 120 Sessions.

Users online (2,039)