3

Environment: SharePoint Online

I use Rest api to communicate with my lists. I must now, show a list which joins 3 lists:

List1 : ID, Title, Field1_Loockup(List2.ID)

List2 : ID, Title, Field2_Loockup(List3.ID)

List3 : ID, Title

I want like result :

List1.ID | List1.Title | List2.ID | List2.Title | List3.ID | List3.Title

How can I do?

Dikesh Gandhi
  • 6,803
  • 4
  • 30
  • 55
Mathi
  • 141
  • 2
  • 7

2 Answers2

4

You can try using the expand clause

http://siteurl/_api/web/lists/getbytitle('listname')/items?$select=id,title,field1_lookup/id,field1_lookup/title&$expand=field1_lookup

I am not sure if it's possible to expand the second level i.e field2_lookup but you can try

http://siteurl/_api/web/lists/getbytitle('listname')/items?$select=id,title,field1_lookup/id,field1_lookup/title,field1_lookup/field2_lookup/id,field1_lookup/field2_lookup/title&$expand=field1_lookup,field1_lookup/field2_lookup
Amal Hashim
  • 28,306
  • 5
  • 31
  • 61
0

I would suggest using Content search webpart which will be a huge boost to your application.

If all the list have same content type then search on the basis of that else use OR condition for the different content types.

In the display template you can easily manipulate the data to show in which ever fashion you want.

Taran Goel
  • 4,474
  • 5
  • 20
  • 44