SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Think of this scenario,
If I add two user entries to people picker(multiple selection is permitted) field.
I need to count these entries using java script/Jquery(Output what i want is: 2).
how can I do this.
I tried to get the value of that field using Jquery it's giving hell out of things.
This is what i tried:

 $("#DivId").focusout(function () {
share|improve this question

Update: The people picker will create a span element for each user, you should be able to use this code (using jQuery):


If you have several pickers you should be able to split them, for example by [name*=UserFieldValue] like this:

  var count = $(this).next().find('.ms-entity-resolved').length;
share|improve this answer
Thank You @eirikb .. I am using 2010 version.. I will check this code – Praveen M P Feb 24 '14 at 7:03

EntityEditor.js contains method GetPickerControlValue for getting picker control value(s). (by default ';' delimiter is used for multiple values)

The following code demonstrates how to get the number of control values in Picker Control:

var pickerControlVals = GetPickerControlValue(currentEntityEditorContextId, true, true);

var numOfUsers = pickerControlVals.split(';').length - 1;

Variable currentEntityEditorContextId corresponds to Picker Control Id and available on the page where Picker Control is rendered

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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