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
Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

Difinity Conference 2022

Difinity Conference 2022

Register today for two amazing days of learning, featuring intensive learning sessions across multiple tracks, led by engaging and dynamic experts.

European SharePoint Conference

European SharePoint Conference

The European SharePoint Conference returns live and in-person November 28-December 1 with 4 Microsoft Keynotes, 9 Tutorials, and 120 Sessions.

Power Apps Ideas

Changes to Ideas Coming

We are excited to announce a new way to share your ideas for Power Apps!

Top Solution Authors
Top Kudoed Authors
Users online (2,286)