0

I need do a filter where a lookup column is null, doesn't point to any thing. I tried

var endpoint = _spPageContextInfo.webAbsoluteUrl   
+ "/_api/web/lists/GetByTitle('" + listName + "')/"
+ "items?$select=ID,Title,Name,Company/Id" 
+ "," + appDict.fieldDict["WorkPhone"]
+ "," + appDict.fieldDict["Email"]
+ "," + appDict.fieldDict["MobilePhone"]
+ "&$expand=Company/Id"
+ "&$filter=Company/Id eq null"
+ "&$orderby=Name asc"

but it doesn't work, I get no results even when there is a list item that has null as the lookup.

  • 1
    Please elaborate more, Your question is not clear enough to understand. – Pradip R. Dec 9 '15 at 5:28
  • Did you create Id column in Company list? or it is the default one? – Atish Dipongkor - MVP Dec 9 '15 at 6:47
  • Id is the default one in the Company list. – blindcodifier9734 Dec 12 '15 at 21:23

Your Answer

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

Browse other questions tagged or ask your own question.