cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
jonathanO
Level: Powered On

Button with Patch() does not consistently work

I have a button with a few Patch() functions.  The button always works the first time you press it.  However, if you press the button again within about 15 seconds of the initial press, the Patch() functions do not exectue.

I have Notify() function at the end of the OnSelect property of the button and that always executes.  If I wait about 15 seconds after the intial click and click the button again, the Patch statements execute as expected. 

It seems like PowerApps disabled the Patch statements for about 15 seconds after they intially execute.  

 

The problem is that the button is to update multiple columns in an Azure SQL table.  The use case is that the user could:

1. Update some fields and press the Save button which Patches the database table
2. Forget to update a field and or maybe has new information, update more fields, then press save again (within seconds of the initial Save click


In the above scenario, the user would need to wait 15 seconds before saving again which is a very bad experience.  

Has anyone ran into this issue and if so, how did you solve it so the button can be pressed as quickly as needed?

1 ACCEPTED SOLUTION

Accepted Solutions
jonathanO
Level: Powered On

Re: Button with Patch() does not consistently work

The problem was not the Patch function.  The problem was actually a ClearCollect that executed after the patch to refresh the in-app collections was pulling from a view.  I had to Refresh() the view after each patch.

1 REPLY 1
jonathanO
Level: Powered On

Re: Button with Patch() does not consistently work

The problem was not the Patch function.  The problem was actually a ClearCollect that executed after the patch to refresh the in-app collections was pulling from a view.  I had to Refresh() the view after each patch.

Helpful resources

Announcements
firstImage

Watch Sessions On Demand!

Continue your learning in our online communities.

SecondImage

PowerApps Monthly Community Call

Next Wednesday, August 21st at 8am PDT

Top Community Contributors for July 2019

Top Community Contributors for July 2019

Let's thank our top community contributors

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

FirstImage

Power Platform World Tour

Coming to a city near you

thirdimage

PowerApps Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

FourthImage

Join PowerApps User Group!!

Connect, share, and learn with your peers year-round

FifthImage

Dynamics 365 and Power Platform April 2019 Release notes

Features releasing from April 2019 through September 2019!

SixthImage

Power Summit Australia 2019

August 20-23rd 2019

Users Online
Currently online: 204 members 3,926 guests
Please welcome our newest community members: