Hello together,
in my PowerApp I have a button with a OnSelect Function that works as a counter and increases the number in a sharepoint list with every click. Patch function is working perfect, but when I click the button too fast right in a row, then I get a error for the second click because patch function makes trouble. If I wait one or two seconds, there is no problem.
To prevent this, I am looking for a possibility to set the displaymode of the button to "disabled" for maybe two seconds when you press the button. Is something like this possible and if yes how can I implement it? If not does anybody have another idea how to solve the problem?
Thank you,
Lukas
@luwu_7100
The button's [AutoDisableOnSelect] set to true works in general but if you want to conrol it this may help:
Button's [OnSelect]: for example
UpdateContext({locDisable:true, cnt: cnt+1});Patch(list,Defaults(list),{Title:cnt}) ;UpdateContext({locDisable:false});
Button's [DisplayMode : If(locDisable,DisplayMode.Disabled,DisplayMode.Edit)
Hope this helps.
WarrenBelz
146,522
Most Valuable Professional
RandyHayes
76,287
Super User 2024 Season 1
Pstork1
65,890
Most Valuable Professional