It is often useful to be able to link text or graphics to the values in the SharePoint document library that a Visio diagram is stored in. A SharePoint Document library is just a list with columns and Visio 2013 documents can be linked to the data in SharePoint lists … and it will be automatically refreshable. This means that Approval Status changes, for example, can be displayed as text or icons. This article goes through the methodology of linking data from the SharePoint document library to the Visio document.
First, I created a Visio Cross-Functional Flowchart document that was saved into a Visio Process Library in SharePoint 2013 online. Note that it could be in any document library which has versioning enabled, and it does not need to be this particular diagram type.
The initial Approval Status is Draft, and the Title column is hidden in this view of the list.
I could then use the Link Data to Shapes function, and select either to link the list or a view of the list, as below:
This provided me with an External Data recordset, with far too many columns:
I switched off some of the columns with the Column Settings dialog. Note that I later realised that I should have checked the Data Type of the Name column because I did not really want it to be automatically creating a hyperlink.
I then linked the row from the External Data window to the border shape of my cross-functional flowchart. It could, of course, have been any other Visio shape, but this seemed suitable for this purpose.
This linking causes the columns from the External Data window to become Shape Data rows on the shape.
I then thought it would be simple to link the Title column from the library to replace the Title text in the border shape. Therefore I added some text into the Title field on SharePoint.
I then modified the view settings to display the Title column in SharePoint. In fact, I had to modify all of the template views.
In Visio, I ensured that the option to Overwrite user changes to shape data was ticked.
I then wanted to replace the Title text in the border shape, but I realised that the actual text was in a sub-shape of the group, so I checked the ID of the group shape that contains the Shape Data with the DEVELOPER \ Shape Name button.
Knowing the ID of the group shape meant that I could use INSERT \ Field with a Custom Formula ( = Sheet.1!Prop._VisDM_Title ) to replace Title with data linked text.
So, the text is now going to be automatically refreshed from the SharePoint document library list column value.
I then checked the document back into SharePoint.
This action then requested that I decide on the version and to enter any optional comments.
The Approval Status changed to Pending
So, I then had to decide whether to Approve or Reject my own changes.
This dialog then enabled me to Approve or Reject the changes to the Visio document:
The Approval Status changed again in the SharePoint list:
The Shape Info pane in the Visio Web Access web-part in a SharePoint web page automatically updated with the latest values.
I did notice that the Visio Web Access control displays the numeric equivalent of the Approval Status:
0 = Approved
1 = Rejected
2 = Pending
3 = Draft
However, this methodology means that I can now reflect the Visio documents version, status, etc., as text and/or graphics within the Visio document itself. This is very useful for version control, and for including on any prints that may also be created.