This question is an exact duplicate of:

I have a small problem that i am facing while i fetch a column that is should Cost Modeler(People Picker field) from other list.
As, i fetch the values using top, i return 1329 items and then i append it to the dropdown. but the problem is as i append it to the dropdown it does not append all the names.

The problem that i see is in the console i see Array with the result Title:'Name of the Employee' but in some arrays there is no result and thus it does not find anything in it.

How do i get all the names in the dropdown and also remove the duplicates?


marked as duplicate by Gaurravs, Mohamed El-Qassas MVP Oct 29 '18 at 12:42

This question was marked as an exact duplicate of an existing question.

  • Please check if there are empty data in the list. Are you filtering in the REST Url? – Sohail Shaikh Oct 29 '18 at 5:15
  • i am not filtering. Can you please tell me how do i check if there are empty data in the list? – jayant khushalani Oct 29 '18 at 5:17
  • If you are appending the value from Title column then go to list, apply filter to the "Title" column with "Empty". – Sohail Shaikh Oct 29 '18 at 5:20
  • no i mean in the code. How do i check if there are empty data and not take it in the array so when i append to the dropdown i do get all the names. – jayant khushalani Oct 29 '18 at 5:21
  • There are empty data in the list – jayant khushalani Oct 29 '18 at 5:22

To filter empty data of list:

var oDataUrl = siteUrl + "/_api/web/lists/GetByTitle('ListName')/items?$top=5000&$Select=Title,ID&$filter=Title ne ''"


var oDataUrl = siteUrl + '_api/web/Lists/GetByTitle(\'ListName\')/GetItems(query=@v1)?@v1={"ViewXml":"<View><Query><Where><IsNull><FieldRef Name=\'Title\' /></IsNull></Where></Query></View>"}'

(For People Picker) OR

/_api/web/lists/getbytitle('List Display Name')/items?$expand=Author&$select=Author/Id,Title&$filter=Title ne ''
  • so my column is a People Picker, how do i fiter out the empty names in that column – jayant khushalani Oct 29 '18 at 5:28

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