how to display 2 sharepoint lists(connected by lookup field) in a common datatable on a page using rest api

Mahi 1 Reputation point
2021-09-17T17:19:49.427+00:00

i want to display 2 sharepoint lists(connected by lookup field) in a common datatable on a page using rest api. The functions for retrieving data from both the tables should be different

SharePoint
SharePoint
A group of Microsoft Products and technologies used for sharing and managing content, knowledge, and applications.
6,076 questions
SharePoint Development
SharePoint Development
SharePoint: A group of Microsoft Products and technologies used for sharing and managing content, knowledge, and applications.Development: The process of researching, productizing, and refining new or existing technologies.
1,698 questions
No comments
{count} votes

1 answer

Sort by: Most helpful
  1. RaytheonXie_MSFT 14,546 Reputation points Microsoft Employee
    2021-09-20T04:12:02.957+00:00

    Hi @Mahi ,
    We can retrieve all datas connected from one of the list by rest api. I created two list. Table 'CompanyTest01' has a column 'Company' look up table 'Address' with two columns : 'City' and 'State'.I tested the following code and successful retrieve all datas.
    133452-sample.txt


    If an Answer is helpful, please click "Accept Answer" and upvote it.
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.