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

Announcements

News and Announcements icon
Community site session details

Community site session details

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

Auto-populate Manager name of selected user Power apps

(0) ShareShare
ReportReport
Posted on by 433

Hello Users,

 

II was building a form with two fields in it. EmployeeName (people picker) and Manager (People picker). Based on the user selected in Employee manager I would like to auto populate that user's manager in Manager column. I have seen some posts but I'm missing something. I have tried Office365Users.ManagerV2(Datacard.Selected.Email).DisplayName. Didn't work. Can I achieve this in the same columns or do I need to use combo boxes?

 

Thanks in advance!

Categories:
I have the same question (0)
  • JimmyW Profile Picture
    2,567 on at

    Put this in the DefaultSelectedItems

     

    {
     '@odata.type': "#Microsoft.Azure.Connectors.SharePoint.SPListExpandedUser",
     Claims: "i:0#.f|membership|" & Office365Users.ManagerV2(Datacard.Selected.Email).mail,
     DisplayName: Office365Users.ManagerV2(Datacard.Selected.Email).DisplayName
    }

     

  • KrishR Profile Picture
    433 on at

    @JimmyWork ,

     

    Thanks for the response. That didn't work at my end. Can you please correct me if am missing anything?

     

    {
     '@odata.type': "#Microsoft.Azure.Connectors.SharePoint.SPListExpandedUser",
     Claims: "i:0#.f|membership|" & Office365Users.ManagerV2(DataCardValue9.Selected.Email).mail,
     DisplayName: Office365Users.ManagerV2(DataCardValue9.Selected.Email).DisplayName
    }

    I get the error on mail in the second line.

  • JimmyW Profile Picture
    2,567 on at

    This works for me @KrishR 
    Change the DisplayName to displayName and put it in DefaultSelecteItems. 
    Just tested the below lines.

     

    {
     '@odata.type': "#Microsoft.Azure.Connectors.SharePoint.SPListExpandedUser",
     Claims: "i:0#.f|membership|" & Office365Users.ManagerV2(DataCardValue2.Selected.Email).mail,
     DisplayName: Office365Users.ManagerV2(DataCardValue2.Selected.Email).displayName
    }

     

  • JimmyW Profile Picture
    2,567 on at

    @KrishR Did this solve your issue?

  • KrishR Profile Picture
    433 on at

    I'n not sure. But I see an error from my side. I see error on the "mail" in the second line.  When I hover it says "Name isn't valid. This Identifier isn't recognized".

  • JimmyW Profile Picture
    2,567 on at

    @KrishR You are most likely getting the error due to the EmployeeName is Blank, try selecting a user in the EmployeeName field and then it should work.

    On the EmployeeName set the Default = Blank()
    And the DefaultSelectedItem to

     

    If(
     IsBlank(DataCardValue5), Parent.Default,
    {
     '@odata.type': "#Microsoft.Azure.Connectors.SharePoint.SPListExpandedUser",
     Claims: "i:0#.f|membership|" & Office365Users.ManagerV2(DataCardValue5.Selected.Email).mail,
     DisplayName: Office365Users.ManagerV2(DataCardValue5.Selected.Email).displayName
    })

     




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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 335 Most Valuable Professional

#2
11manish Profile Picture

11manish 166

#3
sannavajjala87 Profile Picture

sannavajjala87 71 Super User 2026 Season 1

Last 30 days Overall leaderboard