cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
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
Highlighted
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.  

 

 

View solution in original post

3 REPLIES 3
Apaco89
Level: Powered On

Re: Button Enable/Disable

Any Idea Please ? This is an urgent requirement. Appreciate your help. Apaco
Highlighted
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.  

 

 

View solution in original post

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
thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

Top Kudoed Authors
Users Online
Currently online: 48 members 840 guests
Please welcome our newest community members: