Monday, February 8, 2016

PeoplePicker Field knowledge

Hi folks,

Hope..all are doing good. Let me explain you the issues I faced in retrieving the value of PeoplePicker fields.

It is Office 365 site. I was working in SharePoint list edit form and trying to fetch the values from different list based on primary key. Well, text and choice fields are cool and I didn't face issues in getting those. But when it comes to "Person or group" fields, they were hitting my head like anything. I googled many things and tried methods like 'get_lookupValue()' and 'get_lookupId' but all resulted into an error. Even the method 'get_email()' thrown an error of "undefined function".

Later, I checked the peoplepicker field settings. Please check the image below.

In Person or Group field settings, I've selected 'No' in "Allow multiple selections" and tested with the same functions stated above. It worked!!!!!!!!!!!!!!!!!!
As per the system, only 1 name is allowed in the PeoplePicker fields so I preferred to do so.

I'll research from my side in future and continue adding to this post on how to read peoplepicker field if "Allow multiple selections" is selected as 'Yes'

Thanks for reading.

No comments:

Post a Comment