5

I am trying to get data from SharePoint list using REST query and filter on some column having null values. But It can't return desired items..

 http://<Server>/_api/web/Lists(guid'2B3BD6CD-172B-4320-898F-30BA1DA0928E')/Items?$filter=CustomColumn eq null
  • Any error are u getting? your query seems okay? – Atish Dipongkor - MVP Sep 21 '16 at 10:35
  • @AtishDipongkor : no error.. but also returning no data ... "results": [] – SID Sep 21 '16 at 10:58
  • For all interest users, It's sad to say that $filter does not support null as value.. and there is one work around is there.. visit this link to find answer.. – SID Sep 22 '16 at 6:47
3

It seems that ODATA for SharePoint REST does not support the filtering based on null.

https://social.msdn.microsoft.com/Forums/office/en-US/4690e596-aeae-49e7-9057-f31352d92e07/how-to-filter-on-empty-string-value-list-items-using-rest-api?forum=appsforsharepoint

But there ist someone with nearly the same issue here:

Checked null with dateTime in REST API SharePoint

  • Yes.. you are right.. your given link has given me solution.. and it's also true that $filter not support null.. – SID Sep 22 '16 at 6:44

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.