4

I know how to expand my lookup using this format:

'/_api/web/lists/getbytitle('LookupList')/items?$select=LookupOneId,LookupTwo/Title,&$expand=Lookup'

LookupOneId will give me an ID for the lookup in a list. LookupTwo.Title will give me the title of the lookup. What I need is something that will give me a lookup property inside LookupTwo (e.g., LookupTwo/LookupThree/Active).

Is this possible? I haven't been able to figure out the syntax if it is possible.

Edit: I can't expand a boolean field with one-level for some reason. LookupTwo/Title works along with the other text fields, but the boolean field doesn't. I don't see that listed as a limitation. I've seen some other answers questions which would indicate that this was a problem 2 years ago. I wonder why the latest 2013 patch wouldn't have addressed it.

3

There are two types of expands: those based on property relationships (e.g Web -> Lists -> Fields) and those based on lookup fields. You can use nested includes for relationships based on properties but you can only go one level deep for relationships based on lookup fields.

| improve this answer | |
  • Thank you. I knew I had done it before with folders/files, but I didn't look at them as two separate types of expands. – Dinerdo May 31 '17 at 14:45
  • 1
    I wonder why this one level limitation for lookup fields when using the REST API? It causes me all kinds of messy, inefficient work arounds. I think it will work for multiple levels if you use the listdata.svc API, but that API requires work arounds also as it actually changes the names of properties, etc. – Frank Oct 16 '17 at 16:25
1

There is no way to do this in 1 Rest Call. You can try using Batch Requests or multiple calls.

| improve this answer | |

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.