1

I have a SP2010 client side app making REST calls. I have a large list that I would like to make a filtered query using the value of a none or many choice field called 'displays'. I have no access to add to server side code on this one.

When I 'expand' the query I can access the value of the choice like so

myDataVar.d.results[0].Displays.results[0].Value

Because dragging 1000 rows to the client to show 20 is cruel and unusual network punishment I need to filter d.results on .Displays.results[0].Value.

I have tried this:

[site]/_vti_bin/Listdata.svc/MasterDataList?$filter=Displays/Value eq 'Wide'

I am rewarded with the error message

"No property 'Value' exists in type 'System.Collections.Generic.IEnumerable`1[[Microsoft.SharePoint.Linq.DataServiceEntity, Microsoft.SharePoint.Linq, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c]]' at position 9."

Per another thread I have tried

/_vti_bin/Listdata.svc/MasterDataList?$filter=DisplaysValue eq 'Wide'&$expand=Displays

error:

No property 'DisplaysValue' exists in type 'Microsoft.SharePoint.Linq.DataServiceEntity' at position 0.

Testing for 'Displays' without the 'Value' suffix the error is:

Operator 'eq' incompatible with operand types 'System.Collections.Generic.IEnumerable`1[[Microsoft.SharePoint.Linq.DataServiceEntity, Microsoft.SharePoint.Linq, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c]]' and 'System.String' at position 9.


My stuck back in 2010 again thanks in advance.

  • The issue is that the field is a multiple choice field and the example are for a single choice field. I haven't come across a solution for the multi-choice field in REST. You may want to consider redesigning to multiple single-choice fields. – Lost in Alabama Oct 4 '16 at 15:05
  • This does seem to be the line that cannot be crossed so far. No multi-select choice filtering in the 2010 listdata.svc REST. :( Sadly, while ideal, I cannot make changes to the structure. – Joe Johnston Oct 4 '16 at 16:55

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.