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 / Patch only on successf...
Power Apps
Answered

Patch only on successful form submission BUT form has two buttons

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

Hi there so pretty much have the same issue as this guy

handling a SubmitForm failure

And I had already come to my own conclusion that I should use onSuccess, until it dawned on me that the form has an approve and reject button.

 

How would I get around failed form submissions with two buttons?

 

Could I do something like add an if statement in the OnSuccess to detect the buttons selected state? does that state even exist in the scope of OnSuccess?

 

I can't believe I'm the only one that has come across this requirement before but can't seem to find much on the matter

Categories:
  • Verified answer
    WarrenBelz Profile Picture
    156,570 Most Valuable Professional on at

    Hi @JoePike ,

    Set a Variable (two different ones) on each button.

    At the OnFailure event, you can choose which item to action. I would also reset the relevant variable after actioning this.

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

     

     

     

     

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    @WarrenBelz  sounds like a solution to me! Something else that was advised was to separate the submission functionality from the approve and reject action, either on the browse screen or by adding a save/update button and using that for submission (neither which seemed like a user friendly approach)

     

    Your solution sounds like something that should be implemented by Microsoft don't you think? Buttons could have an onSuccess or OnSubmit value that could be blank or if populated could be fed to the forms OnSuccess value

  • WarrenBelz Profile Picture
    156,570 Most Valuable Professional on at

    Thanks @JoePike ,

    Agree with all you have said - one thing you get used to in Power Apps is working with the tools you have available. After a while you just get the accept this . . .

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

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 382 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 329

#3
WarrenBelz Profile Picture

WarrenBelz 187 Most Valuable Professional

Last 30 days Overall leaderboard