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.