In the following, I describe how to show content from two lists in the
same view. Here is a simple list of items on a SharePoint page. The
items are residing in two different lists:
Lists are called, Wave 1 and Wave 2.
Wave 1 list is a custom list with Title column:
Wave 2 is as simple as Wave 1:
I opened the site with lists in SharePoint Designer, and I chose "Data Sources". Then I clicked on "Linked Data Source":
I selected Wave 1 and Wave 2 in the Wizard:
And I chose the "Merge" option, so I can sort and filter the content as it was one single list:
I have a data source now, and I need a page to do a web part that shows the content.
I clicked on "Site Pages" and I added new "Web Part Page"
Yes, it's called Untitled_4.aspx :o)
Then I clicked on "Insert" tab in the ribbon, and selected DataView button. The last item in dropdown is my "Linked Data Source" called "New Data Source":
I clicked on "Add/Remove Columns":
I removed "Modified" column:
I found the "row view" in code for DataView web part. "Row view" contains XSLT that is used to display items:
I changed:
<xsl:value-of select="@Title" /></td><td class="ms-vb">
<xsl:value-of select="@Editor" />
to:
<xsl:value-of select="@Title" /></td><td class="ms-vb">
<xsl:value-of select="@Editor" disable-output-escaping="yes" />
When "disable-output-escaping" is set to "yes" the column is displayed as HTML and not as text. @Editor column contains HTML that renders as Lync presence and Editor's name that is link to MySite.
Then I clicked on "Sort & Group" in the ribbon and sorted the view by Title:
I clicked on "Web Part" in the ribbon and I selected "To Site Gallery":
DataView with two lists as data source is saved as web part on the site now.
I can go and open a page and add a web part. When I edit a web part, I can make changes to the XSLT view:
And the web part looks like this:
This is only SharePoint. We are not in business of saving lives. Cool and other options in Pay Now are here if you think this blog post helped you.
Lists are called, Wave 1 and Wave 2.
Wave 1 list is a custom list with Title column:
Wave 2 is as simple as Wave 1:
I opened the site with lists in SharePoint Designer, and I chose "Data Sources". Then I clicked on "Linked Data Source":
I selected Wave 1 and Wave 2 in the Wizard:
And I chose the "Merge" option, so I can sort and filter the content as it was one single list:
I have a data source now, and I need a page to do a web part that shows the content.
I clicked on "Site Pages" and I added new "Web Part Page"
Yes, it's called Untitled_4.aspx :o)
Then I clicked on "Insert" tab in the ribbon, and selected DataView button. The last item in dropdown is my "Linked Data Source" called "New Data Source":
I clicked on "Add/Remove Columns":
I removed "Modified" column:
I found the "row view" in code for DataView web part. "Row view" contains XSLT that is used to display items:
I changed:
<xsl:value-of select="@Title" /></td><td class="ms-vb">
<xsl:value-of select="@Editor" />
to:
<xsl:value-of select="@Title" /></td><td class="ms-vb">
<xsl:value-of select="@Editor" disable-output-escaping="yes" />
When "disable-output-escaping" is set to "yes" the column is displayed as HTML and not as text. @Editor column contains HTML that renders as Lync presence and Editor's name that is link to MySite.
Then I clicked on "Sort & Group" in the ribbon and sorted the view by Title:
I clicked on "Web Part" in the ribbon and I selected "To Site Gallery":
DataView with two lists as data source is saved as web part on the site now.
I can go and open a page and add a web part. When I edit a web part, I can make changes to the XSLT view:
And the web part looks like this:
This is only SharePoint. We are not in business of saving lives. Cool and other options in Pay Now are here if you think this blog post helped you.
Comments