I have a small requirement regarding People Picker Data.

What i am trying to do in the below code is to fetch data from List A into List B. There are various columns involved but the one i am facing problem with is People Picker.

I am able to fetch People-Picker Value with no issues but it only gives me 100 values in the array and the problem with that is there are duplicate values.

Thus, As the 100 items do involve names but there are few names which are missed due to the duplication.

When i am appending the Names into the dropwdown, i am removing the duplicate values but i am not able to get all the names in that column.

//To get all employees name.

function getAllEmployeeNames(){
var results;
    url: _spPageContextInfo.siteAbsoluteUrl + "/_api/web/lists/getbytitle('Should Cost Projects')/items?$select=Should_x0020_Cost_x0020_Modeler/Title&$expand=Should_x0020_Cost_x0020_Modeler/Id",
    type: "GET",
    headers: {
        "Accept": "application/json;odata=verbose",
    success: function (data) {
    error: function (data) {
return results;

// To append employee name into dropdown.

var employeeName=$("input[title^='Employee Name']").val();
$("input[title^='Employee Name']").hide();
$("input[title^='Employee Name']").after("<select id='EmployeeField' class='ms-RadioText'><option value=''></option></select>");
var allEmployeeNames=getAllEmployeeNames();
       // if(employeeName==item.Title){
            $("#EmployeeField").append("<option selected='selected' value='"+item.Title+"'>"+item.Title+"</option>");
                $("#EmployeeField").append("<option value='"+item.Title+"'>"+item.Title+"</option>");
        } */  

//To remove duplicate values after appending into dropdown

$("#EmployeeField option").each(function() {
    $(this).siblings('[value="'+ $(this).val() +'"]').remove();

Specific Requirement: I want to get all the people-picker names not only 100 names from List A.

Would really appreciate if you could help me on this.

2 Answers 2


As you are using rest and you are not specifying the top operator to get the number of rows to return by the get request therefore the rest api is default row as 100. To fetch more than 100 rows in a get request of rest you can use the Top =1000 Example :-

url: _spPageContextInfo.siteAbsoluteUrl + "/_api/web/lists/getbytitle('Should Cost Projects')/items?$select=Should_x0020_Cost_x0020_Modeler/Title&$expand=Should_x0020_Cost_x0020_Modeler/Id&$top 5",


  1. $top — It is used to control the page size. We can use $top to get more than 100 items but there is also limitation that you cannot get more than 5000 items using $top



By default REST GET method returns only 100 items.

To get more items than 100, you need to use "$top" functionality in REST endpoints.

In your case, while fetching items from list A, use following URL:

_spPageContextInfo.siteAbsoluteUrl + "/_api/web/lists/getbytitle('Should Cost Projects')/items?$select=Should_x0020_Cost_x0020_Modeler/Title&$expand=Should_x0020_Cost_x0020_Modeler/Id&$top=1000"

it will pull 1000 items from list A.

  • As i tried your method and i am receiving names in the array but it seems that duplicate values are also coming which i have a code for written in the example above but it is not working for it. Any help regarding it? Oct 23, 2018 at 6:23
  • there are various ways to remove duplicates, in your case i will suggest that remove duplicate values before appending to dropdown. see some examples given here to remove duplicates. Oct 23, 2018 at 6:52
  • If this answers your requirement, please accept the answer so that other user can get help from accepted answers directly. Oct 27, 2018 at 17:28
  • The problem is i am not able to achieve all the names. Oct 28, 2018 at 15:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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