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

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

Power Platform Call June 2022 768x460.png

Power Platform Community Call

Join us for the next call on June 15, 2022 at 8am PDT.

PA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.

PA.JPG

New Release Planning Portal (Preview)

Check out our new release planning portal, an interactive way to plan and prepare for upcoming features in Power Platform.

Top Solution Authors
Top Kudoed Authors
Users online (1,741)