cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Helper V
Helper V

Populate Managers Name from Different People Field - Based on SharePoint List

Hello,

 

I have gone through many references for this request however somehow the solutions are not working in my case.

I am trying to get the managers display name from a different people field as per below snap. But getting error.

Capture.JPG

I tried different combinations however any of it is not working. Below are some of them.

 

1. Office365Users.Manager(Office365Users.MyProfile(DataCardValue1.Selected.Email).DisplayName

2. Office365Users.Manager(Office365Users.MyProfile(DataCardValue1.Selected.ID).DisplayName

3. Office365Users.Manager(User(DataCardValue1).Email).DisplayName

 

etc.

 

Referred the YouTube Link: https://www.youtube.com/watch?v=yuIxzObDa28

 

Can anyone please help how to do that?

 

Regards,

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Super User III
Super User III

Re: Populate Managers Name from Different People Field - Based on SharePoint List

@AkshayManke 

That's better...;)

 

So the formula still should be:

Office365Users.ManagerV2(DataCardValue1.Selected.Email).displayName

However, if there is nothing selected, you will get an error on that formula.  However...it should still work if you have a value user selected in the DataCardValue1 control.

 

You could alter the formula to this to try and remove the error

If(!IsBlank(DataCardValue1.Selected.Email), 
    Office365Users.ManagerV2(DataCardValue1.Selected.Email).displayName,
    ""
)
_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up. Solved your problem? - Click on Accept as Solution. Others seeking the same answers will be happy you did.

View solution in original post

17 REPLIES 17
Highlighted
Super User II
Super User II

Re: Populate Managers Name from Different People Field - Based on SharePoint List

@AkshayManke 

You are missing a closing ')'

 

Office365Users.Manager(Office365Users.MyProfile(DataCardValue1.Selected.Email)).DisplayName

Highlighted
Helper V
Helper V

Re: Populate Managers Name from Different People Field - Based on SharePoint List

Hello @Eelman,

Thanks for the help.

Tried that as well but still getting the error. Below the GIF for your reference.

 

Error.gif

 

 

 

Can you please help?

Highlighted
Super User III
Super User III

Re: Populate Managers Name from Different People Field - Based on SharePoint List

@AkshayManke 

Please consider changing your formula to the following:

Office365Users.ManagerV2(DataCardValue1.Selected.Email).displayName

You were using the MyProfile function and trying to pass an email. MyProfile is specific to the current person.  If you want the profile from another user you should use the UserProfileV2. 

However, in the formula, you don't even need that, just pass the email of the person you want to the ManagerV2 function and it will get the appropriate manager.

 

I hope this is helpful for you.

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up. Solved your problem? - Click on Accept as Solution. Others seeking the same answers will be happy you did.
Highlighted
Helper V
Helper V

Re: Populate Managers Name from Different People Field - Based on SharePoint List

Hello @RandyHayes,

 

I tried your suggestion but still it is showing a red line and not accepting as formula. Below the GIF for your reference.

Error.gif

 

 

 

 

I also tried to add UserProfileV2 with different combinations but still it not working. Below the GIF for that testing.

Error 1.gif 

Could you please help?

 

Thanks,

Highlighted
Super User III
Super User III

Re: Populate Managers Name from Different People Field - Based on SharePoint List

@AkshayManke 

So the issue is with the DataCardValue1 control.

What is the Items property of the DataCardValue1 control?

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up. Solved your problem? - Click on Accept as Solution. Others seeking the same answers will be happy you did.
Highlighted
Helper V
Helper V

Re: Populate Managers Name from Different People Field - Based on SharePoint List

Hi @RandyHayes ,

 

Choices([@'PhoneList'].ID)

is the item property.

 

Thanks,

Highlighted
Super User III
Super User III

Re: Populate Managers Name from Different People Field - Based on SharePoint List

@AkshayManke 

Ah...yes, that is not going to work.  Your selection will not have an email address in it.  You are going to need a valid email address in your dropdown.

Which column in your list actually has email addresses in it?

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up. Solved your problem? - Click on Accept as Solution. Others seeking the same answers will be happy you did.
Highlighted
Helper V
Helper V

Re: Populate Managers Name from Different People Field - Based on SharePoint List

Hi @RandyHayes ,

 

It is a People Column in SharePoint. Actually i don't have any column where Email address is there. What should be the workaround for the same please?

Highlighted
Super User III
Super User III

Re: Populate Managers Name from Different People Field - Based on SharePoint List

@AkshayManke 

But you have Choices([@PhoneList].ID) 

ID is an ID column in SharePoint, it is not a People column.

What is the name of the People Column in SharePoint?

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up. Solved your problem? - Click on Accept as Solution. Others seeking the same answers will be happy you did.

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Tech Marathon

Maratón de Soluciones de Negocio Microsoft

Una semana de contenido con +100 sesiones educativas, consultorios, +10 workshops Premium, Hackaton, EXPO, Networking Hall y mucho más!

Top Solution Authors
Top Kudoed Authors
Users online (5,961)