3

I am using SharePoint 2010 and SPServices to get values from people picker in custom field. It is working fine but not fetching data for required fields. can anyone help me with this.

var PP = $().SPFindPeoplePicker({ peoplePickerDisplayName: 'peoplepicker_display_name' });
for(var i=0;i<PP.dictionaryEntries.length;i++)
{
    PP += PP.dictionaryEntries[i].AccountName +","
}

Thanks

  • Add your code to your post – Erin L May 5 '16 at 17:30
  • code has been added in question – Rahul Dayal May 5 '16 at 17:41
  • It looks like you first set PP to the object returned by SPServices, but then try to append strings (AccountName) to it. Did you mean to build a string variable? – Erin L May 5 '16 at 17:51
  • no.. the PP.dictionaryEntries return zero item – Rahul Dayal May 5 '16 at 17:54
  • So peoplepicker_display_name is the name of your column? What happens if you use console.log(PP); with the console open? – Erin L May 5 '16 at 18:28
0

i solve above issue with help of below link.

http://ecarlos.net/post/2012/10/19/Get-PeopleEditor-(PeoplePicker)-values-in-sharepoint-2010-using-SPServices.aspx

basically SPFindPeoplePicker search for label name of column. if you have required field * mark next to you field name then spserivce did find column name. just remove or shift * mark from label name.

above link is given solution not able to add my HTML here as example

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.