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.

Atish Kumar Dipongkor
  • 13,371
  • 5
  • 32
  • 64
jtiger12
  • 21
  • 2

1 Answers1

1

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

Also check REST API Limitations-Workarounds

Atish Kumar Dipongkor
  • 13,371
  • 5
  • 32
  • 64