web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Show success message a...
Power Apps
Answered

Show success message after patch

(1) ShareShare
ReportReport
Posted on by 576

I have a form that uses the patch function on submit.  How do I show a 'Your request has been submitted!' message after the patch function has executed when a new form is submitted?

Categories:
I have the same question (2)
  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    If you are using a form control, the form has a onSubmit property that you can use to navigate to a new screen or to show a pop up or a modal with the success message. 

     

    However, If you are using a patch function instead of Submit(Form) formula then you can check if there were any errors from the patch(). If there weren't any errors you can navigate to a new screen or show a pop up or a modal with the success message. 

     

    Patch(DataSource, Record); If(IsEmpty(Errors(IceCream, EditRecord)), <Show Success Message>, <Show failure message>)

     

    You can find a similar scenario as yours on the page

  • Pstork1 Profile Picture
    69,125 Most Valuable Professional on at

    Take a look at this article on how to display a dialog using Power Apps.  

    https://powerapps.microsoft.com/en-us/blog/creating-dialogs-in-powerapps/

    Follow those steps and use an UpdateContext() after the Patch() in your onselect to display the dialog.  Have a button or 'X' on the dialog to dismiss it and updateContext() to false to make the dialog disappear again.

  • mdevaney Profile Picture
    29,991 Moderator on at

    @ahhollan 
    Put this code in the OnSuccess property of your Form

    Notify("Your request has been submitted!", Notification.Success)

     

    ---
    Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up." 

  • ahhollan Profile Picture
    576 on at

    This formula doesn't work since I'm using the patch function and not SubmitForm.  I'm seeing a lot about using updatecontext, but I haven't fully figured that out yet.

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    @ahhollan I used this video to do a similar functionality of one of my projects. https://www.youtube.com/watch?v=SaDEVOgOlYY&list=PLcwrIWK7WBcRyFBAFeC-Ws8kJYAGTc8Qi&index=16

  • Verified answer
    mdevaney Profile Picture
    29,991 Moderator on at

    @ahhollan 
    Right!  I didn't read carefully enough.  Here's the code for PATCH.

    Set(varRecord, Patch(your_code_here));
    If(!IsBlank(varRecord),
     Notify("Your request has been submitted!", Notification.Success),
     Notify("Your request was not submitted", Notification.Failure)
    );

     

    ---
    Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

  • ahhollan Profile Picture
    576 on at

    I had to change Notification to NotificationType, but once I did that it worked. Thanks for all the help. You are always helpful and quick to respond.

  • abbyltorres Profile Picture
    4 on at

    There's also a "Success Message" field on the Entity Form where you can simply add the desired message. 

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    This is almost working, but the app won't recognize the .Failure piece, even after switching to NotificationType.Failure. Any suggestions?

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    NotificationType.Failure isn't a valid option. The correct syntax is NotificationType.Error

     

    Check the Notify function documentation. Notify function in Power Apps - Power Platform | Microsoft Learn

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 519 Most Valuable Professional

#2
11manish Profile Picture

11manish 489

#3
Haque Profile Picture

Haque 327

Last 30 days Overall leaderboard