In this blog post I wanted to cover the concept of using a Visio Diagram shape to filter a SharePoint list. In my scenario, imagine that you have a Visio document that maps out a specific process. For each step in the process there are different documents that need to be referenced. We want to create a simple page that users can access to see the process and to locate the required documents for each step in the process.
To get started we will need to have 3 different components:
- A list within SharePoint that contains the information about the process step.
- A diagram in Visio that is linked to the SharePoint list.
- A SharePoint Document Library that has a lookup field that references items in the list used for step 1.
Our 3 lists will be linked together based on the process information list. Our Process list is our primary list. The Visio document and the associated documents list will both link to items in the process list. This linking will provide us with a way to filter the data. We are able to create this connection using the lookup feature within SharePoint and the Visio features to connect a diagram to SharePoint list data.
For my Process list I have just created a simple custom SharePoint list. My list is based off of the Custom List template and uses the default Title Column and a multi-line column called Description.
For my Visio Diagram, I started with a simple diagram that outlines my process. A screenshot is provided below:
Once I had the diagram as I needed I selected the Data Ribbon so I could connect this diagram to an external data source (the list I created in step 1).
Selecting the Link Data to Shape opens a window that allows you to configure your data connection. In our example we are going to connect to the SharePoint list we created in step 1.
If you follow the wizard you will first need to select your SharePoint site and then you will need to select the specific list to connect to:
Now that our list items are displayed in data window, we will take each process item and associate it with a step in our process diagram.
We will need to repeat this step until all the shapes in the diagram are linked to the items in the SharePoint list.
Next we will need to create our library and add a column that links back to the same list of procedures that we linked the diagram to in the previous step. Here is a screenshot of the library. I have created one lookup column.
Now that we have the content configured we will be creating the display. For this I am going to create a page in the Site Pages library and then add two web parts to the page. Once both web parts are added, I will use a web part connection to pass data from the Visio Web Part to the Shared Documents web part.
For my Visio Web Part I will use the web part toolbar to configure the link to the published diagram and I will also set the properties to configure a custom height and width. Below are some screenshots of the configuration:
In addition to this, I need to configure the web part so it can use additional information in web part connections. In Visio when we added the connection to the list, we added the ID column to the shape data (this happened automatically as we linked the data shapes). We want to use this column as our connection so we need to configure the web part. This is done by adding ID to the tool pane option for exposing properties.
Once we complete the configuration and save the page you should see something similar to the screenshot below.
Next, I will add the document library we created in the steps above.
Now we just need to add a connection between the two web parts. This is done from the drop down menu of the Visio web part:
Then we will set the web part to Get Filter Values from:
And then we will need to connect ID from the Visio Diagram to the Process we linked to for the Associated Documents Library:
Once the configuration is in place, when you select a shape in the Visio Diagram it will filter the documents list to only show associated documents.
In this blog post we just looked at a simple example of linking content between a Visio diagram and different libraries. When you take this example and scale it out to larger business solutions you will be able to quickly see some of the benefits that are available by combining just a few out of the box tools! I’d love to hear about how you are using this type of solution, so please leave comments so we can see other examples!