web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Auto-populate person l...
Power Apps
Unanswered

Auto-populate person look-up as the manager of a nominated person (not current user)

(0) ShareShare
ReportReport
Posted on by 651

Hi, I have a PowerApp based on a SharePoint custom list. It contains a person look-up card whereby the form submitter nominates a particular person (Employee).   When this person is entered I would like a separate manager card (person look-up) to automatically populate as this person's manager. 

 

The person is not the current user.  The manager is based on whoever is selected.

The only posts I can find on this topic assume the user is the current user which is not the case for this form.

does anyone know the syntax required in the manager field default setting?  I am connected to Office365Users service...  just can't work out the syntax. Something like: Office365Users.ManagerV2(Employee datacardvalue :User().DisplayName})???

Thanks.

 

 

Categories:
I have the same question (1)
  • Verified answer
    Brice235i Profile Picture
    651 on at

    Hi, I managed to work this out...

    NameDatacard  is the person look-up field from who the ancilliary fields are derived.

     

    Screen

    On Visible

    Set(gvCurrentUser, Office365Users.MyProfileV2());
    Set(gvCurrentManager, Office365Users.ManagerV2(gvCurrentUser.userPrincipalName))

    NameDatacard

    OnChange -

    Set(gvCurrentManager, Office365Users.ManagerV2(NameDataCardValue.Selected.Email));Set(varManager,gvCurrentManager)

     

    ManagerDatacard

    DefaultSelectedItems

    {DisplayName: gvCurrentManager.displayName,
    Claims: "i:0#.f|membership|" & gvCurrentManager.userPrincipalName}

     

    Department

    Default

    First(Office365Users.SearchUser({searchTerm:NameDataCardValue.SearchText})).Department

     

     

  • Community Power Platform Member Profile Picture
    on at

    Thanks for posting this information, I was trying to do the same and found it very helpful 😃

  • abhivijayakumar Profile Picture
    4 on at

    If I'm the current user, I'm not able to get my Manager's Managerfield in person/group field. Could anyone help?

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 717 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 329 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard