0

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 & added this formula inside the DefaultSelectedItems, as follow:

enter image description here

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.

1 Answer 1

1

Try settings DefaultSelectedItems property of manager data card to:

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

OR simply:

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

References:

  1. How to auto-populate the Manager Details based on the person field
  2. Auto-populate person look-up as the manager of a nominated person (not current user)

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.