cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Frequent Visitor

Patch only on successful form submission BUT form has two buttons

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

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Community Champion
Community Champion

Re: Patch only on successful form submission BUT form has two buttons

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.

 

 

 

 

View solution in original post

3 REPLIES 3
Highlighted
Community Champion
Community Champion

Re: Patch only on successful form submission BUT form has two buttons

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.

 

 

 

 

View solution in original post

Highlighted
Frequent Visitor

Re: Patch only on successful form submission BUT form has two buttons

@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

Highlighted
Community Champion
Community Champion

Re: Patch only on successful form submission BUT form has two buttons

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 . . .

Helpful resources

Announcements
Check this Out

Helpful information

Featuring samples like Return to the Workplace and Emergency Response Applications

August 2020 Community Challenge: Can You Solve These?

August 2020 Community Challenge: Can You Solve These?

We're excited to announce our first cross-community 'Can You Solve These?' challenge!

secondImage

Return to Workplace

Reopen responsibly, monitor intelligently, and protect continuously with solutions for a safer work environment.

secondImage

Super Users Coming in August

We are excited for the next Super User season.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (8,680)