SharePoint Related Lists (Part 4 of 4)
Yes, the title of this post is a little confusing, especially if you read the other 3 parts, but let me explain. The first three parts of this series were all about the Query String URL Filter, and how to create mashups that display multiple related lists on one page. Lists have a lot more relational capabilities now, which is seen everywhere from lookup columns to workflows. So, since we’re talking about mashups and related lists, I thought I’d show you the Related Lists button in SharePoint 2010/2013, which lets you quickly throw a few web parts on a page, and automatically connects them. So, another title for this blog could be “how to do the stuff from the other 3 posts… in SharePoint”
In this example in SharePoint 2010, there is a main projects list with several lists with related items that lookup to the projects list. Let’s create some simple ones quickly, just to try it out.
- Custom list on the site called Projects. To try it out, all you need is a Title field.
- Create a new Issues list on the site. Create a new required lookup column in the list, called ProjectID, and make it look up to the Project’s Title field.
- Create a new Project Tasks list, and also add a required ProjectID field that looks up to the Project list’s Title field.
- Create a few items in each list, with some tasks and some issues associated with each project name.
- Go back to the Projects list. Click to create a new view, name it Mashup.
- On the new view, click Site Actions and choose Edit Page.
CHECK IT OUT!!! There’s a button in here to Insert Related List!!!
- Click the Insert Related List button, and the drop-down will show the Project Tasks list and the Issues list. Insert each one on the page.
- On the Page tab in the ribbon, click Stop Editing. This is what the page looks like now:
DONE. WOW, it’s going to be so easy now for end users to be able to create their own related list views, without even having to know how to create the web part connections!
How did it work? Since the Issues and Project Task lists contained Lookup columns to the Project list, SharePoint automatically knew to consider them “related lists”. If a list has no other lists that look up TO IT, then the related lists button will be grayed out.
One more thing… yes, the Related Lists button does exist in SharePoint Designer 2010 also, and not just in the browser.
Here are the previous parts in this series: