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 / My OnSuccess function ...
Power Apps
Answered

My OnSuccess function is not firing.

(0) ShareShare
ReportReport
Posted on by 171

I have a submit button on an edit page with the following patch function. 

 

Patch(

    EP_Title_To_Persona,

    LookUp(EP_Title_To_Persona, Id=Gallery_Main.Selected.Id),

    {

        Persona: DataCardValue8_Persona.Text,

        Title: DataCardValue9_Title.Text,

        Updated_By:User().FullName,

        Updated_Date:Now()

        }

);

 

I added the following to the on success of the form. 

 

Notify("yep",NotificationType.Success,5000);Back()

 

I never get the notification, and the back doesn’t work. 

 

Why isn’t my on success firing?

Categories:
I have the same question (0)
  • Verified answer
    cdwhite Profile Picture
    1,069 Most Valuable Professional on at

    Hi,

     

    I don’t think the OnSuccess of the form will fire, because you’re not asking the form to do anything.

     

    Typically, to save a form back to a data source, we’d configure the OnSelect of a button with SubmitForm(NameOfYourForm). The form is then “active” and can trigger the OnSuccess (or OnFailure) properties depending on whether it’s successful.

     

    However, your Patch statement is saving the data directly instead. If this is by design, you can extend the Patch statement to handle success/failure notification, using the IfError function

     

    https://learn.microsoft.com/en-us/power-platform/power-fx/reference/function-iferror

  • Fuzzy1 Profile Picture
    171 on at

    Yeah, I just proved the submit form fires the OnSuccess and Patch doesn't.

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 355 Most Valuable Professional

#2
11manish Profile Picture

11manish 209 Super User 2026 Season 2

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 150 Super User 2026 Season 2

Last 30 days Overall leaderboard