2

I have a multi person/ group column. I need to apply rest api filter on this column. I can filter it by values. eg:

_api/Web/Lists/getbytitle('testList')/items?$filter=(Access/Id+eq+21)

But when I apply the filter for null, it is not returning any rows. I tried :

_api/Web/Lists/getbytitle('testList')/items?$filter=(Access+eq+null)

This return no data.

I tried:

_api/Web/Lists/getbytitle('testList')/items?$filter=(Access/Id+eq+null)

This is throwing folllowing error:

<m:type>Microsoft.SharePoint.SPException</m:type>
<m:stacktrace>
at Microsoft.SharePoint.SPGlobal.HandleComException(COMException comEx) at Microsoft.SharePoint.Library.SPRequest.GetListItemDataWithCallback2(IListItemSqlClient pSqlClient, String bstrUrl, String bstrListName, String bstrViewName, String bstrViewXml, SAFEARRAYFLAGS fSafeArrayFlags, ISP2DSafeArrayWriter pSACallback, ISPDataCallback pPagingCallback, ISPDataCallback pPagingPrevCallback, ISPDataCallback pFilterLinkCallback, ISPDataCallback pSchemaCallback, ISPDataCallback pRowCountCallback, Boolean& pbMaximalView) at Microsoft.SharePoint.SPListItemCollection.EnsureListItemsData() at Microsoft.SharePoint.SPListItemEntityCollection.TryWriteAsOData(ODataWriter writer, RESTfulQuery query, ProxyContext proxyContext) at Microsoft.SharePoint.Client.ServerStub.Write(Object value, Uri path, ODataWriter writer, RESTfulQuery query, ProxyContext proxyContext) at Microsoft.SharePoint.Client.Rest.RestRequestProcessor.Process() at Microsoft.SharePoint.Client.Rest.RestRequestProcessor.ProcessRequest() at Microsoft.SharePoint.Client.Rest.RestService.ProcessQuery(Stream inputStream, IList`1 pendingDisposableContainer)
</m:stacktrace>
1

Try to $expand the field, as well as $select it, like this:

?$select=*,Access/Id&$expand=Access/Id&$filter=Access/Id+eq+null
  • Same error. $filter=(Access/Id+eq+21) gives me data. No need to expand and select. – Praveen Prasannan Apr 17 '14 at 9:25
0
?$select=*,Access/Id&$expand=Access/Id&$filter=Access/Id eq null

Try this out. Why included '+' symbol or is that getting added by this webpage?

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.