0
 http://myserver/_vti_bin/ListData.svc/abcList?$select=ab/Title&$expand=ab 

This is my request. I am getting expanded results of ab in an "results" array Like this :

"ab": {
          "results": [
            {
              "__metadata": {...},
              "Title": "value1"
            }
            {
              "__metadata": {...},
              "Title": "value2"
            }
            {
              "__metadata": {...},
              "Title": "value1"
            }
          ]
        }

Now I want to filter it out according to ab/Title eq 'value1'

like this : http://myserver/_vti_bin/ListData.svc/abcList?$select=ab/Title&$expand=ab&$filter=ab/Title eq 'value1'

But I am getting following Error --

{
  "error": {
    "code": "",
    "message": {
      "lang": "en-US",
      "value": "No property 'Title' exists in type 'System.Collections.Generic.IEnumerable`1[[Microsoft.SharePoint.Linq.DataServiceEntity, Microsoft.SharePoint.Linq, Version=14.0.0.0, Culture=neutral, PublicKeyToken=myToken]]' at position 8."
    }
  }
}
  • Is there any help from my answer? – Atish Dipongkor - MVP Nov 21 '15 at 6:22
  • Thanks for the quick reply... According to your response if we enable multiple selection in sharepoint level then can we do $filter operation on Multivalued look up column? – Shrabo Nov 23 '15 at 10:48
0
"Markets": {
          "results": [
            {
              "__metadata": {...},
              "Title": "Netherlands"
            }
          ]
        }

Above response seems to me that your lookup column is allowing multiple values. Unfortunately $filter is not supported on multi-valued lookup columns. It will not work unless you disable multiple selection in your lookup column.

MSDN reference reads

Because multi-value lookup fields are returned as a string of multiple values, there is no way to query for them (for example, the equivalent of an Includes element or NotIncludes element is not supported).

Also have a look

  • first link idoesnt work – user13408 Nov 23 '15 at 11:38

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.