I have a list that I'm trying to query using ListData.svc. I am trying to pull back records within a date range and with a particular value from a Choice field checked. If I use Lists.asmx, I can build the CAML query to pull back the records I need, but I want to use ListData.svc for this solition. I am able to filter on columns whose values are stored in the list and I am using "$expand" to pull back the data for my Choice field, but I don't know how to structure the OData URI to filter based on the choice field.
I'm trying a query like this:
http://tssites/departments/appdev/_vti_bin/ListData.svc/TeamCalendar?$expand=Flags&$filter=Flags eq 'PTO'
The error I am getting back is:
Operator 'eq' incompatible with operand types 'System.Collections.Generic.IEnumerable`1[[Microsoft.SharePoint.Linq.DataServiceEntity, Microsoft.SharePoint.Linq, Version=220.127.116.11, Culture=neutral, PublicKeyToken=71e9bce111e9429c]]' and 'System.String' at position 6.
Thanks for your assistance.