question

johnjohn-0472 avatar image
0 Votes"
johnjohn-0472 asked AllenXu-MSFT commented

Unable to get the user's manager using Office365Users.ManagerV2() connector

I have 2 SharePoint People or Group fields which allow single selection. one field represents the User (DateCardValue6) and the other field represents the Manager. now inside the manager field i disabled the field + i added this formula inside the DefaultSelectedItems, as follow:-

133150-manager.png

but when i run the form and i select a value inside the User field, nothing will be shown inside the manager.. any advice? Although the user has a manager inside AD.


office-sharepoint-onlinesharepoint-dev
manager.png (27.9 KiB)
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

AllenXu-MSFT avatar image
2 Votes"
AllenXu-MSFT answered AllenXu-MSFT commented

Hi @johnjohn-0472 ,

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: replace DataCardValue2 - User Combobox with your own

Sample:
133481-image.png

Save and publish it to your SharePoint site.

Test result in my SharePoint list form.
133409-demo.gif


If an Answer is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


image.png (91.2 KiB)
demo.gif (115.1 KiB)
· 2
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

@johnjohn-0472,

Is there any update on this thread? I'm looking forward to your reply :-)

0 Votes 0 ·

@johnjohn-0472,

Please feel free to let me know if you still need any help.

0 Votes 0 ·