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 Apps / "Success" Message afte...
Power Apps
Unanswered

"Success" Message after a flow run

(1) ShareShare
ReportReport
Posted on by 7

Hi, 

 

I'm fairly new to PowerApps and I find myself struggling a little. 

 

I have a Button with the action OnSelect that triggers a flow Run to check-in something to a table - I was wondering if it would be possible to add a success message to let the user know that something has been "Checked-In Successfully" 

 

I've had a look at the Notify function in Power Apps but I don't know how I would be able to implement that alongside the flow.Run() function. Any ideas? 

Categories:
I have the same question (0)
  • VineetDesai Profile Picture
    20 on at

    Hi @RavChop ,

     

    In your Power Automate, after the action that performs the check-in, add "Respond to a PowerApp or Flow" action to send data back to the parent PowerApp

    VineetDesai_0-1614001463036.png

    Choose the type of data to be sent back (Text in your case?) and save the Power Automate flow. 

    VineetDesai_1-1614001646069.png

    In your PowerApp, store the value returned by the PowerAutomate flow in a variable using the SET command. (You may need to remove and add the Power Automate connection before you perform this step)

     

    SET(varStatus, PowerAutomateFlow.Run(params).status);

     

    You can notify the user on the basis of the value stored in the variable set above.

  • Verified answer
    fugixi Profile Picture
    205 on at

    Welcome to the community!

     

    Certainly, this can be done.

    It does require you to add an output parameter to your flow, like below.

    Power Automate output parameter to PowerApps.png

     

    What I have done here is I have added a parallel branch which will trigger if the previous step (Send an HTTP request... in my case) fails. However, for trying this out, you could start with only one branch and have the success = True statement.

     

    IMPORTANT!

    As soon as you change input and/or output to a Power Automate flow, which you already have added to a PowerApps, needs to be removed and added anew within your PowerApps applications.

     

    Now, in PowerApps for your OnSelect event property, you can have something like the below expression:

    If(
     'Power Automate Flow to Run'.Run().success = "True",
     Notify(
     "Flow has run successfully.",
     NotificationType.Success,
     2000
     ),
     Notify(
     "Flow run has failed.",
     NotificationType.Error,
     5000
     )
    );

     

    _______________________________________________________________________________________________________________________
    Did this post solve your problem? Please click Accept as Solution so that others may find it more quickly.
    If you liked my response, please give it a Thumbs Up.
    Do you want to hear more from me? Visit my blog Marble's Power Corner.

  • logixcrm Profile Picture
    71 on at

    Hi @fugixi 

     

    I have created an APP that enables a driver to capture fuel purchases, on screen 1, the user enters the details of the purchase, then on screen 2, the user takes a photo of the receipt.

     

    Once the photo has been taken, the user clicks on submit which triggers a flow. The Flow will find the Fuel Purchase Record, Create a Note, attach the image and set the regarding to the Fuel Purchase Record. 

     

    This all works perfectly except for the fact that the if() statement is causing the Flow to run twice. The below image shows the OnSelect expression. in this expression, I have added the params from the Flow, because as per your formula, there are no params. When I leave out the params the formula does not accept.

    Run Flow on submit of receipt.PNG

     

    Here is the error when the params are left out.

    Error on params.PNG

     

    I have raised a ticket with support, however, they have yet to respond as to why the flow is running twice.

  • logixcrm Profile Picture
    71 on at

    I have managed to resolve the issue, turns out that I could have just wrapped the FlowName.Run() in an If statement which would handle the trigger and the response, not sure how but it does.

     

    The updated expression now works perfectly.

    logixcrm_0-1633255516432.png

     

     

  • CW Profile Picture
    1,044 on at

    Jan. 3, 2023. .success doesn't seem to work any longer.

  • Community Power Platform Member Profile Picture
    on at

    Same here, looks like I can't retrieve data from Power Automate anymore. Like, we can't put a parameter after Run anymore: ThisIsATest.Run(DataCardValue2).myvariable

  • CW Profile Picture
    1,044 on at

    No, run(parameters).success doesn't work.

     

    Powerapps doesn't seem to accept ".success" any longer.

  • logixcrm Profile Picture
    71 on at

    I have just tested this solution with a simple Flow and it does work. I will break it down step-by-step.

     

    Firstly, I created a mobile Canvas APP with a button as per below.

    Screenshot 2023-01-07 195321.png

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

    Then from within the PowerApps maker, I created a simple Flow as follows.

    Screenshot 2023-01-07 195536.png

     

     

     

     

     

     

     

     

     

     

     

    Finally, I set the OnSelect property of the button as follows

    Screenshot 2023-01-07 195748.png

     

     

     

     

     

     

    Here is the final result once the button is clicked.

    Screenshot 2023-01-07 195907.png

     

     

     

     

     

     

    Here is the Flow run history

     

    Screenshot 2023-01-07 200737.png

     

     

    Just remember that the success parameter is not a PowerApps property, it is the name I defined for the response in the Flow.

     

  • CW Profile Picture
    1,044 on at

    Ahhhh, it's a parameter. 👍 Ok, I understand it now, makes total sense. The 'success' was throwing me off. I thought it was yet another msft "sudden change without notice" event 😀.

     

    Thanks

  • Community Power Platform Member Profile Picture
    on at

    Thanks @logixcrm, but it doesn't work for me.

     

    My button:

     

    JulienV_2-1673287186700.png

     

     

    OnSelect:

     

    JulienV_0-1673287023341.png

     

    The error in Power Apps:

     

    JulienV_3-1673287254497.png
    JulienV_4-1673287268980.png

     

     

    My power automate flow:

     

    JulienV_1-1673287137367.png

     

     

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 Apps

#1
WarrenBelz Profile Picture

WarrenBelz 796 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 327 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard