1,334 articles and 8,849 comments as of Friday, January 22nd, 2010

Wednesday, January 13, 2010

Link Two Lists and Display the Data Using the SharePoint Data View

Guest Author: Devin Walker
DLOCC, Inc.

Do you have two lists that you would like to display their data in one convenient location? Well, the SharePoint Data View should work perfectly for this type of use. Follow along with the article to understand more about using the Data View to connect two list and display information of your choosing.


To begin, you must have SharePoint Designer 2007 and appopriate permissions within both lists and the site(s). Also, some general understanding of MOSS is always a plus. Got it? Good, let’s continue.

Getting Setup:

  1. Open the Site holding the page you wish to display the data view on in SharePoint Designer 2007.

  2. Detach the Page from the Layout and Check it out so we can edit it using SPD

  3. Once the page has finished loading select the appropriate Web Part Zone and click Data View > Insert Data View

  4. You will now see the Data Source Library Task Pane on the Right Panel


    Please note: If your lists are on another site collection you will have to use the Connect to another library… link

  5. Expand Linked Sources and click Create a new Linked Source…

  6. The Data Souce Properties window pops up; click Configure Linked Source…

  7. Add lists you want linked from the Available Data Sources to the Selected Data Sources and click Next

  8. For this example we will be using the “Join the contents of the data sources…” option; when you are done click Next
  9.  

  10. In the Data Source Task Pane expand the drop-down to our newly created Linked source and click Show Data

  11. Select the appropriate columns from each data source and expand the Insert the Selected Fields as… drop-down and insert as either single or multiple item view (depending on your preference).

  12. Now you will see the data in either a side-by-side view or stacked (depending on if you joined or merged when linking the two data sources)

  13. Pretty it up a bit and make the Data View display the information how you want, save the page, reattach to the page layout and, finally, check in to major version.

Guest Author: Devin Walker
DLOCC, Inc.

About: Devin Walker is a professional web designer, SharePoint enthusiast and founder of the consulting company DLOCC, Inc.. Devin has years of experience working with companies of all sizes to successfully implement, test and launch SharePoint enterprise content management systems. He writes about his experiences on his blog: DLOCC | Articles and Tutorials 

 

Please Join the Discussion

7 Responses to “Link Two Lists and Display the Data Using the SharePoint Data View”
  1. Laura says:

    Great step-by-step!
    Also, here’s a screencast that I did, which is similar:
    http://www.endusersharepoint.com/2009/07/23/4-minute-screencast-join-view-of-sharepoint-lists/
    “Join View of SharePoint Lists”

  2. Devin Walker says:

    Cool, glad you like it! Great minds think alike :]

  3. Greg says:

    Is there a way to do calculations ‘cross-lists’ using the calculated column method?
    Or do I have to rely on a workflow to ‘copy-paste’ the data from one list to another to be able to use the ‘value’ for calculations?
    Thanks,
    Greg

  4. Laura says:

    Greg,
    In order to do that, you’d have to create the formula within the data view web part, and use XSLT code. You can create a new column in the data view web part, and then in a cell, right click and choose “insert formula”. This allows an interface to create your own formula.

  5. Andy Burns says:

    Greg,

    Yup, that’s possible, though the XSL can be scary. I’ve blogged a bit of an example of what you can do. http://www.novolocus.com/2009/03/25/linking-list-data-and-summing-over-it-with-xsl-and-the-dataview-web-part/

  6. Marc says:

    Devin
    Is it possible to perform a vlookup type function via Data Views? For example if I have an Employee List and a Meeting Attendance List would it be possible to Lookup the Employee Name against the Meeting Attendance List and return ‘Attended” or “Did not Attend”?

Trackbacks

Check out what others are saying about this post...
  1. Customizing SharePoint Site Templates; Alternatives to Office 2010; Google & China Fight Over Search…

    Top News Stories Customizing SharePoint Site Templates (Windows IT Pro) Microsoft SharePoint sites are…




Notify me of comments to this article:


Speak and you will be heard.

We check comments hourly.
If you want a pic to show with your comment, go get a gravatar!