Announcements
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!
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 }
@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.
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 }
@KrishR Did this solve your issue?
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".
@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.
Congratulations to our community stars!
Expanding mentorship, skilling, and AI innovation
These are the community rock stars!
Stay up to date on forum activity by subscribing.
WarrenBelz 316 Most Valuable Professional
11manish 242
Valantis 198