1

All, have not seen this particular scenario mentioned after some google searches. I have a 2 lists I am trying to perform an expand on.

Parent: Contract

ParentFields:

  • ContractNumber (number)
  • ContractEffectiveDate (date)
  • ContractHolder (person with presence)

Child: ContractItem

ChildFields:

  • Title (string)
  • ItemNumber (number)
  • ContractNumberRef (lookup to Contract list)

The REST query is as follows:

_api/web/lists/GetByTitle(ContractItem)/items?$select=ContractNumberRef/ContractNumber,ContractNumberRef/ContractHolder&$expand=ContractNumberRef&$filter=ItemNumber eq '11111234567'

I can get the parent fields from the expand query, however when I try to expand the person field, it throws an error "The query to field 'ContractNumberRef/ContractHolder' is not valid. Is this possible to expand a field in the parent list (2 level expand) or is my query just bad? looking for some expert advice if this is even possible or I need to change my data design.

1 Answer 1

1

Nested query or 2 level $expand is not possible. You can check my explanation from here.

Also check REST API Limitations-Workarounds

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.