I'm using the on prem SharePoint 2013 REST API and I'm getting an error when I try to compare two date fields.
$filter=ExpectedDelivery gt NeededBy
The above query works perfectly using ListData.svc. Any suggestions for the _api endpoint?
Please note that this likely will not be duplicated on an O365 SP site as I have repeatedly established that the O365 REST API does not behave the same as the on prem version regarding date filtering. <= I still get that error too!
Here is my build information:
Major Minor Build Revision
----- ----- ----- --------
15 0 4569 1000
EDIT
I tried the calculated column route but that was no help as you cannot do a filter via REST on calculated fields. As a result, I am currently just going to get all items that match the minimum criteria and then use client side filtering on the rest. It is really sad that SharePoint 2013's REST is lacking in some of the most basic features that would make it highly robust. The ability to not filter on nulls unless you POST a CAML query or to not be able to do simple gt or lt on two date fields is just mind boggling.

0 commentaires:
Enregistrer un commentaire