Auto-populate email address from pc:Person?

I have a pc:Person picker used on an InfoPath form, where they look up their name in Active Directory and select it. The saved form looks like “Last, First” and that’s it. There’s no way I can see for the manager to see user it is (especially if people have the same first and last name).

How can I add another field to this that auto-populates the email address from the Person picker?

I see that AccountId is available under pc:Person which is the username, but whenever I try to drag it onto the form it forces a repeating field and I only want this field to correspond to the picked Person picker (one person).

SharePoint Asked by Zeno on December 17, 2020

1 Answers

One Answer

Use GetUserProfileByName operation of UserProfileService.asmx web service. It has Work Email property. Add this on Data Connection and pass the value from your people picker to this Data Connection then query.

See this for detailed steps:

Answered by Mekalikot on December 17, 2020

Add your own answers!

Related Questions

Add QuickLinks Webpart by using pnp powershell

1  Asked on October 26, 2021 by abdelkader_ak


Reading configuration at runtime

1  Asked on October 25, 2021 by milind


what went wrong with my sharepoint server deployment?

0  Asked on October 25, 2021 by sharepointadmin


Ask a Question

Get help from others!

© 2022 All rights reserved.