cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
cooltechie
Helper IV
Helper IV

How to hide a Drop down value if the logged in user is not the manager

Hello,

 

I have an approval status Choice field and I would like to Hide one of the options in the dropdown if the logged in user is not the manager of the person who created the item.

 

Is this possible in power apps?

 

please advise,

1 ACCEPTED SOLUTION

Accepted Solutions
KOM_4410
Resolver II
Resolver II

Hi...If you are using PowerApps to submit the items, I would include the manager of the person submitting the items with the Office 365 formulas to save it in a column. Let's say you call that column "Manager".

 

Then you can use something like the follwing to collect the manager's name: 

Office365Users.Manager(Office365Users.MyProfile().UserPrincipalName).DisplayName 

You can hide the card and add that formula on the default property so your user experience doesn't change

 

So then, on your other app, compare the name on the "Manager" column with the current user's name to decide if the dropdown is visible or not. For example, if you are using a gallery you can use:

 

Dropdown.Visible=If(ThisItem.Manager= Office365Users.MyProfile().DisplayName, true, false)

 

hope that helps

View solution in original post

1 REPLY 1
KOM_4410
Resolver II
Resolver II

Hi...If you are using PowerApps to submit the items, I would include the manager of the person submitting the items with the Office 365 formulas to save it in a column. Let's say you call that column "Manager".

 

Then you can use something like the follwing to collect the manager's name: 

Office365Users.Manager(Office365Users.MyProfile().UserPrincipalName).DisplayName 

You can hide the card and add that formula on the default property so your user experience doesn't change

 

So then, on your other app, compare the name on the "Manager" column with the current user's name to decide if the dropdown is visible or not. For example, if you are using a gallery you can use:

 

Dropdown.Visible=If(ThisItem.Manager= Office365Users.MyProfile().DisplayName, true, false)

 

hope that helps

View solution in original post

Helpful resources

Announcements
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

Power Apps Community Call

Monthly Power Apps Community Call

Did you miss the call?? Check out the Power Apps Community Call here!

secondImage

Experience what’s next for Power Apps

See the latest Power Apps innovations, updates, and demos from the Microsoft Business Applications Launch Event.

Power Platform ISV STudio

Power Platform ISV Studio

ISV Studio is the go-to Power Platform destination for ISV’s to monitor & manage applications post-AppSource publish.

Top Solution Authors
Top Kudoed Authors
Users online (105,673)