Site icon @WonderLaura

Trying Out Visio Services in SharePoint

Task lists in SharePoint 2010 have a button on the List tab in the ribbon’s Connect & Export section, called Create Visio Diagram.  Thought I’d try this out, and see what I could mock up using this, so I created several tasks in a list, and clicked the button.  It’s the one on the right of “Sync to SharePoint Workspace”, that looks like a little diagram.

CropperCapture[67]

Clicking the Create Visio Diagram button launches Visio 2010 and automatically creates a diagram with the following tabs:

  • Tasks Status
  • Workload Distribution
  • Incomplete Tasks by Assigned To
  • And if there are workflows on the site that utilize this Tasks list, there will be a tab called “Workflow Tasks Status”

Interesting.  This generated diagram seems to be static, though, meaning changes in the data won’t change the diagram.  Here are the steps to make the data dynamic:

  1. In Visio, click the <Data> tab in the ribbon.  Click <Link Data to Shapes>
  2. In the Data Selector, choose “Microsoft SharePoint Foundation Services List”.  Click <Next>
  3. Enter the URL for your SharePoint site.  Not a URL to a list, just the root of the site that the tasks list is in.  Click <Next>
  4. On the Select a List screen, choose “Tasks” and click <Next> and click <Finish>
  5. Now a list of the tasks will be displayed at the bottom of the diagram in Visio.  You now have the ability to manually drag each item in the task list up to the matching item in the diagram.  The other way to match up the data is AUTOMATICALLY.
  6. On the Data tab in the ribbon, click the <Automatically Link> button.
  7. A wizard will pop up.  “All shapes on this page” will be selected.  Click <Next>.
  8. The next screen will allow you to pick the field to match up the items in the diagram with the items in the Tasks list.  By default, ID is selected.  That’s a good one, since it’s unique.  Click <Next> and then click <Finish>
  9. Now, in the data table at the bottom of the diagram, there will be a little link icon next to each task row item, as so:
  10. In Visio, click the <File> button, choose the <Share> tab on the left, and then click <Save to SharePoint> in the middle.  In this demo, I chose a document library on the same site as the tasks list.  Choose Web Drawing, and then click <Save to SharePoint>
  11. When prompted, a pertinent name for this diagram would be “Tasks”.

Now, the data and the diagram are linked, so that viewing the diagram will always represent the current information in the tasks list.  Nice!

The next thing to try out is the Visio Web Access web part with this task list, and see what happens when connecting web parts.

  1. On the tasks list (all items view), click <Site Actions> and choose <Edit Page>
  2. In the middle of the page, click <Add a web part>, choose “Office Client Applications” in the web part categories, choose the Visio Web Access web part, and click <Add>
  3. In the Visio Web Access tool pane, the URL to the Visio diagram is needed, to enter as the “Diagram URL”.  Simply click the ellipses next to the Diagram URL text box, to navigate to and select the Tasks.vdw that was just created.Note that you could just click OK and stop right here, and you would still have a good graphical representation of the tasks in the Visio diagram above the task list.  Further steps entail web part connections, for filtering of data… just to get a little more fancy.
  4. For “Shape Data items to make available to Web Part connections”, type ID
    Remember when we did that “automatically link” thing and chose the ID as the common field?  Well, that’s why we’re using that field here.  Click OK in the web part tool pane.
  5. Next is the creation of a web part connection between Just like we’ve always created web part connections, click the little drop-down box at the top right of the Visio web part, choose “Connections”, then “Send Shape Data To”, then TASKS.
  6. For the connection type, choose “Get Filter Values From” and click <Configure>
  7. For the Provider and Consumer field names, choose ID for both.  Click <Finish>
    (if step 4 above was skipped, ID will not be an option from the Provider)
  8. In the Visio web part, switch over to the Workload Distribution tab, as so:

NOW, on that Workload Distribution tab, when you click on individual tasks, it will automatically filter the tasks list to that one task!  See in the screenshot below, I clicked on Molly’s In Progress task, which put a blue box around it and filtered the task list to that one item.

Also, take a look again at that screenshot at #5 above.  Look at all the many different ways that you can connect this Visio Web Access web part to other web parts!  Seems like some pretty neat little solutions could be created with Visio incorporated.  Also, think about SharePoint workflows, and how they’re now tightly integrated with Visio.  I’m sure we’ll be able to come up with creative ways to display the live diagrams of workflows as they’re running!

If you’re interested in reading more about Visio Web Services, Toni Frankola has written a great article for the SDN E-magazine SharePoint 2010 special.  The PDF of this magazine can be downloaded here:

http://www.sdn.nl/FreeMagazine


Exit mobile version