How to join two SharePoint lists with inner join functionality

Create two SharePoint lists

a)     Customer (Title)

b)    Orders (Title, and Customer)

Here are my lists –

Open the your site using SharePoint Designer (SPD), and add a new page under site pages library

In SPD, go to Data Sources. In the window that appears; create a new Linked source as shown below:

Click on “Configure Linked Source” and go ahead and add both “Customers” and “Orders” and click “Next”

Make sure that you choose to join the contents of the two data sources as shown below

Give it a meaningful name in the “General” tab.

Now Insert an Empty Data View in your page and put the cursor on your data view

Now from the “Data Source Details” pane, select Title from Customer List. And choose – Insert Selected Field as “Multiple Item View” as shown below:

After this your page will look like this

Now add a column to the right side and place the cursor in front a particular value – Say “Joseph”, and now in the Data Source Details Pane, Select Orders –> Title, and choose to insert as “Joined SubView” in the menu shown below:

Specify Join information/condition as shown below:

That’s it! Format it a little bit, run the ASPX – looks like this

Advertisements

About Joseph Velliah
As a SharePoint Developer my professional interests tend to be technical and SharePoint focused. I run a blog at "SP RIDER" where you can expect to read HOW TOs and scenarios that I run into during my day to day job. I hope my posts will give back a little to the community that is helped me.

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: