Filtering Lists based on shape selection using Visio Web Access

I’ve been looking into the options of using Visio Web Access to link Visio objects to SharePoint data. Now that its possible to capture shape data and use it to filter web parts there is a an opportunity to supplement Visio diagrams with contextually relevant information.

In my example I want to show how it is possible to use the selected Visio shape to filter a SP list to display contextually relevant information on the fly.

The list I have created has supplementary information that might be useful to the diagram – please note I made it up very quickly and should not reflect any system design! You can mock-up something similar to the list shown below or anyones interested I could upload it as a list template – just ask.

For this example I have also created a very simple Visio diagram of ‘entities’ which we are going to use as our filter criteria. Create a new Visio diagram and drop on a couple of shapes – it really doesn’t matter what type they are.

The main thing here is the Shape Data – if you are familiar with adding Shape Data  simply define a new data property called ‘Entity’  and type the entity name into the shape information panel.  For those you don’t know what I mean by this, see the steps below.

Right click the shape and select ‘Define Shape Data’. Remove any existing data properties and add a new one called ‘Entity’ as per the diagram below (removing the ‘Order’ text under Value as this is specific to the shape and is added in a later step).

Now with the ‘Shape Information Panel’ you should see the ‘Entity’ data property with a blank value and you can enter the entity value for each shape – which in this example is the same as our shape name. If you don’t know where the Shape Information Panel has got to, enable it by selecting ‘Task Panes -> Shape Data’ from within the ‘View’ ribbon.

At this stage you are possibly wondering why you can’t simply use the Shape Name – doesn’t  the Visio Web Access surface this by default?

Well yes it does but in my tinkering I could not find a way for the Shape Name to correctly filter the list using the Shape Name and after many attempts decided to follow the approach of using custom shape data. If you have figured out a method of using the Shape Name to filter then I’d love to know – hopefully it’s not just something within my environment!

Before moving on make you to add entity values for all your shapes using the shape information panel.

Save the example diagram as a Visio Web Diagram (*.vdx) using the ‘Save As’ function and upload to a document library on SharePoint.  The source data is now created so move on to creating the page and making the filter connection.

Create a new page either using web interface or SP Designer and add two web parts: Visio Web Access and the list you created earlier. I will run through the web interface method below.

Select ‘Site Actions’ -> ‘More Options’ and select ‘Web Part Page’

Select ‘Full Page’ Filtering as your layout, enter a name for your page and click ‘Create’

You will be looking at a blank web part page with a big button to ‘Add a Web part’.

First add the ‘Visio Web Access’ web part which will act as your placeholder for your Visio diagram.

Click the link that says ‘Click here to open the tool pane’ and either paste in the Web Drawing URL to the saved .vdx you uploaded earlier or navigate to it like below.

QUICK TIP: The ‘Override Web Drawing’s default initial view’ option in the web part settings (second configuration option) should be disabled if you are using a diagram with multiple tabs. Despite what you might infer from its name, when enabled, it always refreshes the diagram back to the first tab with each shape selection. My suggestion is to disable this option unless you specifically need the functionality or are using a diagram with only one tab.

The other web part option that needs to be set before we can move on is the ‘Expose the following shape data..” field.

Because we are using custom shape data to filter (i.e. not Shape Name, Shape ID etc) we need to tell the web part to expose this data in order to use it in our connection. In this field type in ‘Entity’ if your following my example, or the name of the data property you created in Visio. We can now use this value to send as a filter to our list web part.

The go back and add another web part for the list you created earlier. This is done by selecting the list from ‘List and Libraries’ Category. It must be pointed out that the list must exist in the same site for this method to work. If your list is in another location or SP Farm then you will need to build a Data View Web Part like I have run through in this article.

Now that both elements are on the page we can set up the web part connection to send the filter value from one to the other.

Make sure the page is in edit mode and select the web part settings drop down for the Visio Web Access web part and select ‘Connections’

The connection type we wish to make is the ‘Send Shape Data to’ which will send the value of the selected shape to the list.

This will bring up a new window with the two-step connection wizard.

Select the ‘Get Filter Values From’

Then select ‘Entity’ in both the provider and consumer field. Essentially you are defining what value is being passed from the Visio web part (in this case our entity shape data value) and the consumer field defines what column on the list is to be filtered based on this value (and again in this example it is also the entity column).

Now the connection is set up, when we select a shape on the diagram it passes the entity name from the shape data to list web part and filters the list accordingly.

In my example I’ve attempted to show how web part connections can be used to supplement an entity relationship style diagram with information from a SP list but this is just one of many possible applications. Now that you can capture ANY type of shape data and pass this to ANY web part – the doors really do open.

Currently I am looking into a documentation system that uses such references to make a set of interactive, highly linked and contextually relevant document with as little content management as possible. I will post more in this space as it progress but this article should prove to be a useful starting point.


Visio Web Access in SP2010 – In-browser view of Visio diagrams with nice Silverlight UI

SharePoint 2010 brings to us some really nice Office web apps that allow in-browser rendering (and editing)  of Office 2007/10 formatted documents and I took a brief look at Word and its co-authoring functionality last year.

This time I’d like to demonstrate Visio Web Access and its nice Silverlight UI that includes features like linking to sub-processes, presentation of the shape data via the shape information panel and the ability to switch between tabs. Visio 2010 now comes with the web drawing format (*.vdw) allows any diagram to be rendered in-browser and is easily done using the  ‘Save As’ function and selecting the *.vdw format.

The Silverlight rendering allows the viewer to ‘zoom and pan’ around the Visio canvas, negating the need for scroll bars and allows large diagrams to be easily displayed on a single page.

It is hard to see from the static picture above but the user can easily drag around the interface, zoom in and out and interact with individual elements within the diagram. In the screen grab above the ‘Rule 2’ decision has a blue highlight indicating it has been selected and would display the shape information in the information panel.

The image below attempts to show the user panning to right hand side of the image and exposing the blank canvas at the top and right of the diagram.

The new ‘linked sub-process’ feature allows shapes to be linked to a sub-processes on a separate and Visio web access maintains this connection through hyperlinks. Using this technique you can have great click-through diagrams linking areas that previously were only accessible by manually switching tabs.

The Shape Information Panel displays shape and hyperlinks data for the currently selected shape.

There is also an option to open in Visio allowing you make edits and save changes back to the document library. These updates are reflected in the rendered version as soon as the document is checked back in to SharePoint. The same result can be achieved by uploading a new version of the .vdw and overriding the existing file.

Visio Web Access  renders tabs in separate canvases and provides a drop down control to navigate through the tabs provides an alternative to linked sub-processes  (although I suggest you utilise this where possible – it’s very user-friendly!). The above screen illustrates this control.

That was a quick look at Visio Web Access and I intend to return to the subject when I have explored the data linking and other cool new features available in SP2010.