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?

  • Why Don't you use Content Search Webpart? – Taran Goel Sep 5 '16 at 7:51
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
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.

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.