cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Anonymous
Not applicable

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
mdevaney
Super User
Super User

@Anonymous 

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

@Anonymous 

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

View solution in original post

3 REPLIES 3
mdevaney
Super User
Super User

@Anonymous 

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

Anonymous
Not applicable

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

@Anonymous 

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

Helpful resources

Announcements
Power Apps News & Annoucements carousel

Power Apps News & Announcements

Keep up to date with current events and community announcements in the Power Apps community.

Power Apps Community Blog Carousel

Power Apps Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Top Kudoed Authors
Users online (3,102)