cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
ThePowerAppsGuy
Resolver II
Resolver II

Button should be pressed, disabled during action taken place and enables again

Hey guys,

I've got a question about the buttons.

If I press the buttons too fast, then my app behaves strangely and not the way I'd like to.

What I'd like to achieve is following:

 

If I press the button, then an action takes place (OnSelect) - during this action the button should be disabled so that the user can't click over and over again. After the action will have taken place (at the end of the action), the button should be enabled again.

 

How to achieve this?

Thanks so much for helping!

1 ACCEPTED SOLUTION

Accepted Solutions
jlindstrom
Super User
Super User

create a variable

Set(varButtonDisplayMode,Edit) on visible of the form

 

onsubmit of button before your command put a Set(varButtonDisplayMode,Disabled);

 

set the DisplayMode property of the button to varButtonDisplayMode

 

then after your command, put semicolon and Set(varButtonDisplayMode,Edit)

 

if the action takes additional time to complete you could also use a timer control to wait a few seconds fore changing the variable back to edit

 

 

View solution in original post

1 REPLY 1
jlindstrom
Super User
Super User

create a variable

Set(varButtonDisplayMode,Edit) on visible of the form

 

onsubmit of button before your command put a Set(varButtonDisplayMode,Disabled);

 

set the DisplayMode property of the button to varButtonDisplayMode

 

then after your command, put semicolon and Set(varButtonDisplayMode,Edit)

 

if the action takes additional time to complete you could also use a timer control to wait a few seconds fore changing the variable back to edit

 

 

View solution in original post

Helpful resources

Announcements
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

MBAS Attendee Badge

Claim Your Badge & Digital Swag!

Check out how to claim yours today!

secondImage

Are Your Ready?

Test your skills now with the Cloud Skill Challenge.

secondImage

Demo Extravaganza is Back!

We are excited to announce that Demo Extravaganza for 2021 has started!

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

Top Solution Authors
Top Kudoed Authors
Users online (44,681)