1

I am using SharePoint 2019. I have list as below structure:

Department

  • ID
  • Title

Process

  • ID
  • Title
  • Department (lookup to department)

BIA

  • ID
  • Title
  • Process (lookup to process)

Now my question is when I REST query to BIA I expand Process list, is it possible to expand Department in the same REST API call?

1
  • Hope somebody will reply
    – Milind
    Apr 23 at 3:17
0

No, it is not possible using a single REST API call.

You will need two API calls. 1st call to expand the details of Process list & 2nd call to expand the details of department list.

6
  • Than this will be very heavy, as I have to call for each row
    – Milind
    Apr 23 at 3:43
  • I am not sure about your other code setup. But, this is a limitation of SharePoint REST API, you cannot expand 2nd level lookup columns. Apr 23 at 3:45
  • Do you know any better way !! I am using pnpjs
    – Milind
    Apr 23 at 3:47
  • Can you please ask a separate question for this? What exactly you are trying to do? what do you mean by "I have to call for each row"? maybe there is alternate way to achieve what you want. Also, add the current code you are using to your new question. Apr 23 at 4:54
  • 1
    In that case, maybe you can first fetch all the department & process list items and then match it with BIA list item using client side scripting & loops. Apr 23 at 4:58

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.