API call to Person/Group field

Hello!

I have separate list with a couple of Person/Group fields. I want to add a button to my form, which will go to that list and return the email addresses of those people in the Person/Group fields and put them in a Single Line Text field in my form data list.

Is there a way to do this?

Thank you!

Hi @DryChips,

Try using PnPjs for that. Do you need to get an array of all emails or the email of a specific person?

A specific person.

If a choose a name from a Person/Group field, I want to return the email address and pass this string to a single line text field.

Hello @DryChips,

Is this a SharePoint list? How do you define which email to return from this list? Do you need to filter it somehow?

Please share screenshots of your form and the list where the email addresses are stored, so that I can be sure I understand your case correctly.