cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
New2PA
Helper I
Helper I

How to use Office365Users.ManagerV2() connector

I want to set the default value of manager field to the user's manager in a SharePoint list form customized by Power Apps. User and Manager are all Person type column in the SharePoint list.

New2PA_0-1632106473224.png

 

I tried the formulas like:

 

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

 

New2PA_2-1632106838989.png

 

f(!IsBlank(DataCardValue2.Selected.Email), 
    Office365Users.ManagerV2(DataCardValue2.Selected.Email).displayName,
    ""
)

 

New2PA_3-1632107046602.png

 

If(!IsBlank(DataCardValue2.Selected.Email), Office365Users.ManagerV2(DataCardValue2.Selected.Email).displayName)

 

 

All returns errors. I am new to Power Apps and want to hear suggestions form you experts. 

1 ACCEPTED SOLUTION

Accepted Solutions
StalinPonnusamy
Community Champion
Community Champion

Hi @New2PA

 

Set the DefaultSelectedItems of Manager combobox Property to

 

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

 

Note: DataCardValue2 - User Combobox

Sample

StalinPonnusamy_0-1632112978297.png

 

View solution in original post

2 REPLIES 2
StalinPonnusamy
Community Champion
Community Champion

Hi @New2PA

 

Set the DefaultSelectedItems of Manager combobox Property to

 

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

 

Note: DataCardValue2 - User Combobox

Sample

StalinPonnusamy_0-1632112978297.png

 

View solution in original post

New2PA
Helper I
Helper I

@StalinPonnusamy 

 

Thank you! It worked perfectly.

Helpful resources

Announcements
PA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Welcome Super Users.jpg

Super User Season 2

Congratulations, the new Super User Season 2 for 2021 has started!

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

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