Page 1 of 1

Get user properties from people picker field

Posted: 05 Mar 2020
by asharma190
Hello, I have a form in forms designer with a people picker field called "Traveler" I would like to get the user ID on change of this field, then query user profiles and get user email and office and add that to 2 separate fields called "txtemail" "txtoffice"

I see the guide for on change and set but I am having trouble with getting the user ID from people picker and seeing the email/office in another single line text field

I have looked through all the past discussions and cannot find anything similar to this. Any help would be appreciated!!!

Re: Get user properties from people picker field

Posted: 09 Mar 2020
by Leslie
Go to read my post : viewtopic.php?f=1&t=3394
I think you can find some usefull information. :)

Re: Get user properties from people picker field

Posted: 10 Mar 2020
by mnikitina
Hello asharma190,

I'm sorry for the delayed reply, we were on holiday.

You can get the email of the selected user using this code:

Code: Select all

fd.field('PeoplePicker').value()[0].EntityData.Email
And to retrieve user profile properties you can use the examples from this article:
https://docs.microsoft.com/en-us/sharep ... dfrom=MSDN