cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Dmott
Level: Power Up

Trying to get ThisItem manager rather than current users manager...

I am trying to display ThisItems  businessPhone.... rather than current users manager... First(Office365Users.MyProfile().BusinessPhones).Value  returns current users businessPhone.

 

Same issue with manager... I can get current users manager, but I want ThisItems manager. Office365Users.ManagerV2(Office365Users.ManagerV2(Office365Users.MyProfileV2().mail).mail).displayName

 

Any help would be appreciated. (I am Novice Level)

3 REPLIES 3
Super User
Super User

Re: Trying to get ThisItem manager rather than current users manager...

@Dmott 

In my example I have replaced MyProfile with UserProfile and added the paramter ThisItem.UserEmail.  This assumes the item has a field called UserEmail holding a single line text email such as "johndoe@yourcompany.com".

 

First(Office365Users.UserProfile(ThisItem.UserEmail).BusinessPhones).Value 
Office365Users.ManagerV2(Office365Users.ManagerV2(ThisItem.UserEmail).mail).displayName

 

 

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

Dmott
Level: Power Up

Re: Trying to get ThisItem manager rather than current users manager...

So that worked well for BusinessPhone, however I still have issues with getting ThisItems manager value.

Office365Users.ManagerV2(Office365Users.ManagerV2(Office365Users.UserProfile(ThisItem.mail).mail).mail).displayName

 

2020-02-14_11-16-20.png

 

 

 

 

 

Super User
Super User

Re: Trying to get ThisItem manager rather than current users manager...

@Dmott 

I made a correction to my original post.  Please try the new code for managers there.

 

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

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,179)