cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Frequent Visitor

Notification in Power Apps when a flow fails

Does anyone now of a way where Power Apps can be notified of when a flow triggered from within the app fails?

 

I have a button that runs a flow for a SQL stored procedure, then runs another command within the app.  Problem is, if the flow fails, I don't want the next command to run.  I know I can build other checks to prevent the following commands to run, but would be easy if some status code for success or failure could be returned.

3 REPLIES 3
Highlighted
Dual Super User II
Dual Super User II

Re: Notification in Power Apps when a flow fails

When you start a flow from inside Power Apps it runs synchronously.  You can use a Respond to Power Apps or an HTTP response to return results or a status code back to Power Apps.  Inside the flow You can use Run After settings to control what happens if a particular action in the flow fails.  So you need to configure the Run After settings to set a status code when the action fails in flow and then return that status code to Power Apps.



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.
Highlighted
Frequent Visitor

Re: Notification in Power Apps when a flow fails

Ah, OK - I see how this works now.  Didn't realize you could do this.

 

Next question is, where is Power Apps can I retrieve the results when I tell the flow to return the results?

Highlighted
Dual Super User II
Dual Super User II

Re: Notification in Power Apps when a flow fails

In the On Select property where you run the flow, simply save the results of that Run() to either a variable or collection (depending on whether you are returning a status code or a set of results).  Like this

Set(flowstatus,flowname.run(parameters to pass))

# or

ClearCollect(flowresults,flowname.run(parameters to pass))


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

Helpful resources

Announcements
secondImage

New Return to Workplace

Reopen responsibly, monitor intelligently, and protect continuously with solutions for a safer work environment.

Check this Out

Helpful information

Featuring samples like Return to the Workplace and Emergency Response Applications

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (8,149)