Displaying SharePoint list items under multiple group headings
Recently I was building an issues list application for a client. The issues broke down in to several major initiatives, with many issues being a member of more than one initiative. What I wanted to do was a build an issues list and then have each issue grouped under the initiative or initiatives it belongs to. My plan was to create a grouped view on an issues list and be done - however when you group by a multi select field, it only groups under the first selection listed in the field.
So I needed a new approach. Next I hit Google, along with my colleague Ryan, to see if someone had already solved the problem of displaying records under multiple group headers. Ryan came across an article at the Microsoft site - http://office.microsoft.com/en-us/sharepointdesigner/HA100991441033.aspx which was a great start. Instead of using XML files as the article suggested I used lists.
I first created a custom list of the initiatives, just a single column list of the values. I then created a Site Column bound to the list. Next I created the Issues List using the issues list template and added my Site Column to the list. Next I added all my data and tagged the issues with the appropriate Initiatives it belongs to. Working through the rest of the example from above, I got a page that displayed the groups (Initiatives) but some of them had no sub tables, as shown below. Close but not what I was looking for.
Searching around the SharePoint Designer UI I then found the nugget that got me exactly what I wanted….
When you select the table for the nested data table and you select the Common Data View Tasks menu you can modify the filter used to build the sub table, specifically the Comparison operator from "Equals" to "Contains". As seen below.
The resulting view looks like the one shown below. Note that the issues in the sub tables appear under multiple top level groupings
This works because the multi-select field contains the Title of all the Initiatives - ie groupings, it belongs to - problem solved. I now had a page that displayed items under multiple group headings using a multi select field.