cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Saratha30_M
Level: Powered On

Notify error message on canvas app from the microsoft flow

I have created a custom canvas app by using Tablet layout. In the action button, added button flow of PowerApps trigger. In the flow, if some failure condition, I would like to show the error message to the user in the canvas app page where we executed the button action. "Notify(message, [Notificationtype])" function is using for display notification to user.  But from the flow, I would like to know how to pass the message to canvas app.

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Dual Super User
Dual Super User

Re: Notify error message on canvas app from the microsoft flow

Hi @Saratha30_M 

 

To return a message to PowerApps, you can add Respond to PowerApps action in the end of your flow. Here, you can set a variable to do so.

Now, for the flow to execute till the last message, you can create a variable. For this, initialize a variable on the top and assign a successful message to it. Now, after the step that is going to fail, add a action to Set the value for that variable in case it fails. Configure Run After as "has failed" and then in the respond to PowerApps action, return the value as a text output.

Please refer to the screenshots:

221.png

 

Now, in the canvas app, remove and register the flow again. For the button, OnSelect property, use the below expression:

Set(ReturnedResponse, FlowName.Run()); Notify(ReturnedResponse.response, NotificationType.Error)

 

Hope this Helps!

 

If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

View solution in original post

2 REPLIES 2
Highlighted
Dual Super User
Dual Super User

Re: Notify error message on canvas app from the microsoft flow

Hi @Saratha30_M 

 

To return a message to PowerApps, you can add Respond to PowerApps action in the end of your flow. Here, you can set a variable to do so.

Now, for the flow to execute till the last message, you can create a variable. For this, initialize a variable on the top and assign a successful message to it. Now, after the step that is going to fail, add a action to Set the value for that variable in case it fails. Configure Run After as "has failed" and then in the respond to PowerApps action, return the value as a text output.

Please refer to the screenshots:

221.png

 

Now, in the canvas app, remove and register the flow again. For the button, OnSelect property, use the below expression:

Set(ReturnedResponse, FlowName.Run()); Notify(ReturnedResponse.response, NotificationType.Error)

 

Hope this Helps!

 

If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

View solution in original post

Saratha30_M
Level: Powered On

Re: Notify error message on canvas app from the microsoft flow

Hi @yashag2255,

 

Thanks for your suggestion.  It is working fine.

Helpful resources

Announcements
firstImage

Power Platform Online Conference

Join us for the first ever Power Platform Online Conference!

firstImage

Incoming: New and improved badges!

Look out for new contribution recognition badges coming SOON!

firstImage

New & Improved Power Automate Community Cookbook

We've updated and improved the layout and uploading format of the Power Automate Cookbook!

thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

seventhimage

Webinars & Video Gallery

Watch & learn from the Power Automate Community Video Gallery!

Top Solution Authors
Top Kudoed Authors
Users online (4,611)