2

I have need to order an Odata call by by the results of a lookup list. I am having trouble using the $expand operator in tandem with the orderby operator. What changes can I make so that my Odata results reflect these needs?

currently I have

/_api/web/lists/GetByTitle('myList')/items?$filter=Field1 eq 'Yes'&$orderby=Field1,lookupCol/results asc&?$expand=lookupCol

lookupCol needs to be one of the orderby columns, but I cannot manage to make that work, I am being told that:

The field 'lookupCol' of type 'LookupMulti' cannot be used in the query sort expression.

  • 1
    try using $orderby=Field1 asc or $orderby=lookupCol/results asc instead of $orderby=Field1,lookupCol/results asc – Atish Dipongkor - MVP Jan 20 '15 at 10:45
  • same here, I can't find a way to "orderby" any Rest query using a lookup with "expand" :( – Alberto Aug 7 '17 at 16:31

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.