Multi SubLists Expand Lookup and Get extra field

Hello

I have 3 LISTS:
LIST01
LIST02
LIST03

LIST01 has lookup control data from LIST02.
LIST02 has lookup control data from LIST03.

It is easy to expand the lookup control in LIST01 and get extra field from LIST02 but i need to get data from LIST03 which is related to LIST02.

How to expand LIST03 from LIST01 lookup control in order to get extra field.

Is that applicable and how?

Thank you

Hello @gkhadra,

You can get field values from the LIST03 with PNPjs Get action.

But first, you need to get the id value from the lookup field pointing to LIST03. For this, you need to get extra fields from the LIST02.

In the settings of the Lookup_LIST01 field, in Extra Fields specify Lookup_LIST02/Id
image

And in Expand specify Lookup_LIST02.
image

Where Lookup_LIST02 is the internal name of the lookup field in LIST02.

Please find the detailed instructions in this article:
https://plumsail.com/docs/forms-sp/how-to/lookup-view.html#getting-extra-fields

Now, you can get the id of the item from the LIST03 and request values from it with PNPjs:

var itemIdLIST03 = fd.field('Lookup_LIST01').value.Lookup_LIST02.Id;

pnp.sp.web.lists.getByTitle("ListName").items
.select("ID", "Title")
.filter("ID eq '" + itemIdLIST03 + "'")
.getAll().then(function(item){

     console.log(item);

});