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

Button Enable/Disable

Hello Community, I need help for enabling and disabling buttons in our power app. I have 7 buttons in my home screen. When I click any one of the button ,I want all the other buttons to be disabled ? How can I do this? Ex: Button 1 Button 2 Button 3 Button 4 Button 5 Button 6 Button 7 When i click on "button 1" i need to disable all other buttons and when i click again on the "Button 1", All the buttons should be enabled. This should apply for all the buttons(button clicks) Is this something doable ? Can anyone please help me? Thanks Apaco
1 ACCEPTED SOLUTION

Accepted Solutions
Super User
Super User

Re: Button Enable/Disable

Hi @Apaco89,

You would use the UpdateContext() function to do this.  All the buttons in the left side of the screen have the following properties:

 The OnSelect property is  

 UpdateContext({dabl: true})

The DisplayMode property is

If(dabl,Disabled,DisplayMode.Edit)

 There is a button on the screen with the Text property "Enable"  This button resets all of the other buttons back to Edit mode.  The OnSelect property of the Enable button is 

UpdateContext({dabl: false})

buttons1.PNGbutton2.PNG

 The Visible property of the Enable button is dabl. 

Also the OnVisible property of the screen should be

UpdateContext({dabl: false})

so that the buttons are all active when the screen becomes visible. 

I'm not sure if this exactly meets your requirements but it seems close and this solution should give you enough information for you to play with the concepts until you get precisely the results that you want.  

 

 

3 REPLIES 3
Apaco89
Level: Powered On

Re: Button Enable/Disable

Any Idea Please ? This is an urgent requirement. Appreciate your help. Apaco
Super User
Super User

Re: Button Enable/Disable

Hi @Apaco89,

You would use the UpdateContext() function to do this.  All the buttons in the left side of the screen have the following properties:

 The OnSelect property is  

 UpdateContext({dabl: true})

The DisplayMode property is

If(dabl,Disabled,DisplayMode.Edit)

 There is a button on the screen with the Text property "Enable"  This button resets all of the other buttons back to Edit mode.  The OnSelect property of the Enable button is 

UpdateContext({dabl: false})

buttons1.PNGbutton2.PNG

 The Visible property of the Enable button is dabl. 

Also the OnVisible property of the screen should be

UpdateContext({dabl: false})

so that the buttons are all active when the screen becomes visible. 

I'm not sure if this exactly meets your requirements but it seems close and this solution should give you enough information for you to play with the concepts until you get precisely the results that you want.  

 

 

Apaco89
Level: Powered On

Re: Button Enable/Disable

Thank you Very much ! This is a great input . Even though this is not my exact requirement , it gives me a whole lot of idea to complete my requirement. Appreciate your help !!

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: 74 members 4,159 guests
Please welcome our newest community members: