web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Change display mode fo...
Power Apps
Unanswered

Change display mode for certain time

(0) ShareShare
ReportReport
Posted on by

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

 

Categories:
I have the same question (0)
  • zeg Profile Picture
    96 on at

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

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 739 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 343 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard