dog tricks

More Tricks with SharePoint Lists

4 minute read
Joelle Jobson avatar

With a solid understanding of SharePoint list building under your belt, you can start using other SharePoint features to get them — and your document libraries — working together. For those already familiar with adding lists and libraries to SharePoint, this article will build on that concept.   

Setting the Scene

Let's use the following as our scenario: a SharePoint site admin is looking to combine a list of customers, a list of projects, a list of customer contacts and a library of customer documents — all of which exist on the site — on one page. With this, she wants the ability to click on a customer's name in the customer list and have that filter the other three lists and libraries so that only content related to that customer is displayed.

Lookup Columns

For this filtering to be possible you'll need to create a relationship between the customer list and the other lists on the site. There's a few different options for this, but to keep it simple let's use a lookup column. 

Lookup columns allow us to pull in values from other lists, which display as choices in a dropdown field in our current list. To return to the SharePoint admin's project, go to the project, the contact and the customer documents to create a lookup column called "Customer." Choose the list to lookup in column settings (e.g., Customers) and the value to pull (e.g., Customer Name). You can also bring in additional (read only) metadata from the Customer list into the current list.

SharePoint Column Settings

Notice the "Relationship" option when creating the column. It gives an option to restrict or cascade deletion, with the default set to restrict. The differences between the two are described as:

“When an item in the target list is deleted, cascade delete will delete all related items in this list. Restrict delete will prevent the deletion of an item in the target list if it has one or more related items in this list.”

Once you've created the column, the projects, contacts and documents in each library should populate it. By making this field required, it will be filled out whenever a new item is added to any of the lists or libraries.

Pages and Adding Web Parts

Next you'll need to create a page to place these lists and libraries. If using SharePoint 2013, click the Site Actions Gear in the top right corner of the site and choose Add a Page. Name the page (e.g., Customer Dashboard) and click Create. When the page displays, use the ribbon to add text, change the layout and add web parts. Pages can be found in either the Pages or Site Pages library (depending on the active publishing features on the site).

Creating a Page

Learning Opportunities

Once the page is configured, insert each of the lists and libraries. I recommend placing the filtering list (in this case, Customers) at the top of the page. To insert a web part click the Insert tab and then Web Part. Select the list/library from the Apps category. If the list or library contain views, edit the web part to select the view that is displayed on the page. Find more details on editing web parts here.

Web Part Connections

Once the page contains all of the list and library web parts, connect the Customer list to each. You'll find the set up for this connection in the top right-hand corner of the Customer list web part, as seen below. Clicking the dropdown in that corner will pull down the web part’s edit menu. This is the same location used to switch the web part’s view, however for the purpose of connecting the Customer list to projects, contacts and customer documents, select Connections and then Send Row of Data to.

Web Part Connections

Select the first list or library web part. A pop up will appear to configure the connection. "Provider Field Name" is the field you added as a lookup column (i.e., Customer Name) and the Consumer Field Name will be the name of the lookup column on the destination list or library (i.e. Customer.) Click Finish to complete your connection. Repeat the process for the remaining lists and libraries on the page.

When all connections have been made, hit save and try clicking the filter icon next to the customer name in the Customer web part. You should see a filtered list containing content from the other lists and libraries related to the selected customer.

Customer Details Page

This is just a taste of what you can accomplish with lists and pages in SharePoint.

Creative Commons Creative Commons Attribution-Share Alike 2.0 Generic License Title image by  pbump 

About the author

Joelle Jobson

Joelle Jobson is a Senior Business Analyst and Consultant with IW Mentor, a SharePoint and Office 365 training and consulting company.