filtering rest api call by calculated column

2018-02-06 22:10:12

I am not getting any results when I try to filter by a calculated column/field. The calculated field returns yes/no and it displays YESes and NOs in the view on browser. But when filtered for Yes or No or 1 or 0, I get the HTTP 400 error (webpage not found). Does any one know if it supported at all?

Make it a boolean. Tested it out on my end and this is what worked.

sitecollection/_vti_bin/ListData.svc/TestList?$filter=IsNum eq true

To add to Lindgren's answer and Aamir's comment..

Using the SharePoint 2010 URI rather than the 2013 URI works for me when retrieving information from SharePoint 2013.

2010: $site + "/_vti_bin/listdata.svc/MyList()?"

2013: $site + "/_api/lists/GetByTitle('My%20List')/items?"

It's worth noting that in my experience SharePoint interacts with the data differently depending on which method is used. For example, in 2010 queries and results whitespace is trimmed from object names, whereas in 2013 queries and results white

  • Make it a boolean. Tested it out on my end and this is what worked.

    sitecollection/_vti_bin/ListData.svc/TestList?$filter=IsNum eq true

    2018-02-06 23:22:00
  • To add to Lindgren's answer and Aamir's comment..

    Using the SharePoint 2010 URI rather than the 2013 URI works for me when retrieving information from SharePoint 2013.

    2010: $site + "/_vti_bin/listdata.svc/MyList()?"

    2013: $site + "/_api/lists/GetByTitle('My%20List')/items?"

    It's worth noting that in my experience SharePoint interacts with the data differently depending on which method is used. For example, in 2010 queries and results whitespace is trimmed from object names, whereas in 2013 queries and results whitespace is replaced by %20 or _x0020_.

    Additional info on the 2010 method: https://msdn.microsoft.com/en-us/library/ff798339.aspx

    2018-02-07 00:13:12