cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
thunter
Level 8

Disable Button based on USer

Right now I have a button that is only Visible if the user is in a Collection called "IsManager". However, I would rather the button be visible but Disabled instead. So I am trying to do this in the DisplayMode depending on if the user falls into the collection IsManager. Any help with the formula? Thank you.

 

If(IsManager=true then Disabled=false) or If(IsManager=false then Disabled=true)

 

3b42abf1d659f2251cc33f2af05adda4.png

2 ACCEPTED SOLUTIONS

Accepted Solutions
Super User
Super User

Re: Disable Button based on USer

@thunter 

Is manager appears to be a boolean (true/false) variable from what you have typed rather than a collection.  If this is the case you should put the code below in your DisplayMode property for the button.

 

 

If(IsManager=true,Edit,Disabled)

 

 

If IsManager is in fact a collection please supply the column names and a sample of what data is held in the collection.

 

---
Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

View solution in original post

Super User
Super User

Re: Disable Button based on USer

@thunter 

Sorry, do this instead: If(IsManager=true,Edit,Disabled) 

View solution in original post

3 REPLIES 3
Super User
Super User

Re: Disable Button based on USer

@thunter 

Is manager appears to be a boolean (true/false) variable from what you have typed rather than a collection.  If this is the case you should put the code below in your DisplayMode property for the button.

 

 

If(IsManager=true,Edit,Disabled)

 

 

If IsManager is in fact a collection please supply the column names and a sample of what data is held in the collection.

 

---
Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

View solution in original post

Highlighted
thunter
Level 8

Re: Disable Button based on USer

@mdevaney 

 

So when I use the formula If(IsManager=true,View,Disabled) for users that are not in the IsManager collection, the button shows but is greyed-out, for users who are in the IsManager collection, the button shows full color but user cannot click on button. I also have the Visible set to true, would that make a difference? Thank you.

Super User
Super User

Re: Disable Button based on USer

@thunter 

Sorry, do this instead: If(IsManager=true,Edit,Disabled) 

View solution in original post

Helpful resources

Announcements
thirdimage

Power Apps Super User Class of 2020

Check it out!

thirdimage

New Badges

Check it out!

thirdimage

Power Apps 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

SecondImage

Difinity Conference

The largest Power BI, Power Platform, and Data conference in New Zealand

Top Solution Authors
Top Kudoed Authors
Users online (5,940)