Quick Tip: Gmail ‘Undo Send’ and Gmail Labs

It’s been a while since I last posted anything so why not start small and quickly go over this handy feature I stumbled across the other day – Gmail Labs!

I use it for the extended ‘Undo Send’ feature but also came across a few other interesting add-ins that I thought would be useful.

To get there, head into Gmail and go into ‘Settings’ from the top right of your screen.

Under settings there is an aptly named ‘Labs’ section which contains all of these little gems.

Scroll through the various labs in the list and if you’re looking for the extended Undo feature like me, it’s very near the bottom.

So what is this undo feature ? it simply allows you to ‘undo’ the sending of an email. By default this value is set to 5 seconds in Gmail so you need to be quick – OR if you like to have flexibility you can extend this to ’30 seconds’ to afford yourself more time to realise you sent your mail to wrong person or left in that obvious spelling mistake!

Other labs I added on first look were:  ‘Google Docs previews in mail’, ‘Google Maps previews in mail’, ‘Google Search’, ‘Got the wrong Bob?’, ‘Mark as Read Button’, ‘Title Tweaks’ and the aforementioned ‘Undo Send’.

Just a quick update to shed light on this handy tool set I stumbled across – hope you like!

SP2010 Workflow Template Validation Rules and limitations of the Visio-driven workflow model

I have been looking into the new SP 2010 Workflow Template that comes with Visio 2010 Premium with the intention of building complex workflows entirely within Visio and then exporting to SP Designer for implementation.

Sound easy? Well everything works fine if you plan to use the default shapes provided by Visio (and map to SP Designer default actions/conditions). Using these you can build workflows as complicated or simple as you like and have full synchronization to and from SP Designer.

The problem with this method is that you are limited to the default actions and conditions that ship with the product. Now granted this default set is better than 2007’s offering but there will certainly be lots of cases where the default set simply does not do the required job and a custom action or condition is required.

Custom actions and conditions can used easily within SP Designer and work really if your building your workflow there but if your planning to import and use those custom actions in your Visio model then you might want to re-think your strategy. Visio will allow you import these custom actions and they are shown with their own shape but you are unable to reuse these custom shapes in other parts of your diagram.

How does it Visio block you from doing this?

Well if you look at the validation rule set for the SP Workflow template using the bVisual Validation Explorer from  David Parker– the SharePoint template has the following rules

ID Name Description
1 MultipleStartWorkflows The diagram must only have one workflow and one start shape
2 NoStartShape The workflow must have a start shape.
3 InvShapeType The shape is not a SharePoint workflow shape. Only SharePoint workflow shapes can be connected in a workflow.
4 ConnectonToParent Loop back to parent shape is not allowed.
S OrphanConnector The connector must be connected to two workflow shape.
6 TerminateHasChildren The terminate shape must not have outgoing connection.
7 NoIfElseBranches The condition shape must have at least one outgoing connection with label Yes or No.
8 NofElseValue The condition shape does not have connectors labelled with Yes or No.
9 StartHasParent The start shape must not have incoming connections.
10 SequentialParallel Parallel activities that are also sequential are not allowed.
11 DuplicateConnections Duplicate connections exist between workflow shapes.
12 NestingDepth Workflow nesting levels must not exceed a maximum of 10
13 CompoundCondition A compound condition cannot be manually added to a workflow diagram. The compound condition can only be generated when importing workflow from SharePoint Designer.
14 CustomAction A custom action cannot be added to a workflow diagram. The custom action can only be generated when importing workflow from SharePoint Designer.
15 UnconnectedWorkflowShape The workflow shape is not connected to the workflow.
16 NoTerminateShape The workflow shape is not connected to a terminate shape
17 InvalidConnector The connector is not a SharePoint workflow connector. Use AutoConnect or the connector tool to connect your shapes.
18 CustomCondition A custom condition cannot be added to a workflow diagram. The custom condition can only be generated when importing workflow from SharePoint Designer.

The rule that we encounter when trying to reuse custom actions in your Visio model is Rule #14 ‘Custom action cannot be added to workflow diagram..’ (see table above).

So the rule set is preventing the reuse of custom actions/conditions for some unspecified reason. I’m sure there is a valid reason for blocking this (maybe the Visio team simply ran out of time?) but the rules are customisable, so you should just be able to edit or override the rule and be done with it, right?

Well no actually. As it happens there are two methods of performing diagram validation using Visio 2010 – deploying the rule sets into the Visio template or writing a Visio solution and burying the logic within the code to fire on the RuleSetValidated event (more info on the Visio Team Blog). Unfortunately for those of us wanting to customise the SharePoint validation rules the SP Workflow template uses the latter method and we are unable to view / modify the logic.

So if you are planning to develop complex and powerful workflows for SharePoint 2010 then you might want to rethink your approach and decide whether you will need to use custom actions / conditions or whether the default set will suit your purpose.

Having said this, it is still possible (and very useful) to use custom actions / conditions and build your workflow entirely within SP Designer then export out to Visio for workflow visualisation. This way you will have accurate workflow representation including all custom actions / conditions but you will not be able to make changes within Visio – it must be done at the SP Designer level.

I intend to look further into this matter to see if there is some way in which custom actions / conditions can be reused  and Visio be leveraged for complex workflow design so look out for updates in this space shortly.

Update 1: Nothing so far from TechNet forums but I’m  awaiting a response from Microsoft to see if there is anyway around this issue.

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.

Referencing lists from external site collections – Cross-site collection lookup with REST and the DVWP!

The inclusion of REST in SP2010 has given us an easy way to reference lists external to the site collection – and cross-site lists too of course! The purpose of this post is to give a quick run down on creating the REST connection as data source and building a data view web part to display the result. The post is probably aimed more towards a non-technical audience but may prove useful for developer / consultant types.

First thing to note is REST must be enabled on your environment so before you go any further, check that the service is running through your web browser. To do this, simply paste the following into your browser and replace the bracketed variables with your SP URL and the name of the list you wish to use.


If that returns a result in browser that looks strikingly like an RSS feed – then great, the service is working. If not, then ask your SP Admin nicely to get REST enabled (or have a go yourself if you have access) and the SPDevWiki has a good article on how to do so here

Techy note: As an alternative to REST you can follow the same principles of this article and use a the list.asmx web service and a SOAP connection as your data source. Personally I find this method easier to build your data view web part but both methods have their merits.

So assuming REST is enabled – we will move onto creating the connection into SP Designer.

First, open up SP Designer and go to the data source window.

Select ‘REST Service Connection’ from the ribbon to create a new REST query. On the ‘General’ tab enter a relevant name and then on the ‘Source’ tab under ‘Select Connection Info’ use the following syntax to specify the URL:


Replace [yoursharepointURL] with your address and [LISTNAME] with the name of your list.  Randy Williams has a good article on using REST in SharePoint 2010 so check that for further information.

The main thing to understand here is the structure of the URL and how to define which list it points to. The intention of this article is to explain how to reference a list on a different site collection but you could use any REST enabled data source for the same purpose.

An issue I encountered when playing around is that windows authentication didn’t seem to work when trying to build a data view web part – so if you encounter this then I suggest specify your domain account in the ‘Login’ tab. See my brief post on this here.

The next thing to do is create a blank web part page in order to display the new data source. Go to the ‘Site Pages’ library or any pages library within your site and select ‘Web Part Page -> Blank Web Part Page’ from the ribbon as shown in the screen below.

Now add the data view web part to the empty web part zone. Make sure the focus is in the web part zone in order to see the ‘Insert’ ribbon.

From the ‘Insert’ ribbon select the ‘Data View’ button and then ‘Empty Data View’. You could select the REST connection by scrolling down the drop down list but I had a few issues with that and prefer to define it in a second step – if it works for you then by all means do it!

If you followed my method of adding an empty data view web part then you see a web part like this.

Right click the web part and select ‘Select a Data Source’ from the context menu.

Now select the REST connection to add the data connection to the Data Source details panel and begin building the data view.

If everything went smoothly then you should see a data in the data source details panel similar to my screen below. If you encountered a ‘non-specific error’ then please see my short post here and force the connection to use your credentials and not windows authentication. I haven’t seen a way around this as yet but will keep an eye out.

Now the data connection is setup it’s just a matter of selecting what fields to display on the web part. There are two ways of doing this and it should be a matter of preference as to which you use – either select ‘Add/Remove Columns’ from the ‘List View Tools – Options’ ribbon or select the columns from the data source details panel and drag them onto your web part.

You should end up with a data grid similar to the mine below depending on how many columns you selected and the structure of your data.

How you build your data view depends the structure of your source data and it’s beyond the scope of this article to detail the various methods but the point here is we have the ability to use data from a list external to the site collection. This is a big plus if your environment has multiple SharePoint deployments for various functions such as a corporate intranet and an Office Business Application (OBA) – and you need to lookup data between them.  It also provides an easier way to reference lists cross-site and I find this method easier than using SharePoint’s lists.asmx web service and SOAP – but that may just be a personal preference!

Hopefully the post is useful to those who haven’t worked with the data view part before and for those who have – hope there weren’t too many screen clips!

As always feedback and questions are more than welcome!

Non-specific error trying to get the data source – REST and SP2010.

I’ve been playing with the REST protocol in SP2010 to bring in data from external lists (external to the site collection) and using it to display the result in the data view web part (DVWP).

Creating the data source went smoothly but when I tried to use it in the DVWP it threw the following unhelpful error.

“The server returned a non-specific error when frying to get data from the data source. Check the format and content of your query and try again. If the problem persists, contact the server administrator.”

I checked the service in the browser and it was working fine – so a quick investigation identified authentication as the problem. I went back to the data source and forced the service to  use my domain account instead of the default windows authentication provider.

As soon as the authentication was forced and I refreshed my data connection – the DVWP pulled everything through perfectly.

This issue seems to be with SP Designer not recognising your domain account when using windows authentication. This work-around will do the job – although it must be pointed out this method sends your credentials unencrypted in the call. Not the type of thing you would put into a production environment but will at the very least get you up and running with REST services inside SharePoint 2010.

More to come on this topic soon, specifically around potential uses of the service and a detailed walk through (time permitting as always!)

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.

Add Images directly into a list on the fly in SP2010 (and store in central asset library)

Ever found it incredibly annoying when trying to add images into a list on the fly? (without having to go away and add them to a library first – then come back and manually add a reference).

Using SP2010’s enhanced rich text field, you can upload and add an image directly into the list without having to leave the page.

When editing the enhanced rich text field (whether editing a single item in the edit form or using the cool new ‘Inline Editing’ feature (explained here), you have the option to insert from the ‘Editing Tools’ menu.

This brings up the ‘Select Picture’ dialog where you can select a local image to upload and a library to stored the uploaded copy.

Then save the uploaded image and complete any metadata requirements.

The image is inserted into the SP list but is managed centrally within the chosen library.

A very handy feature that was missing from 2007 and I’m glad it has been addressed in 2010.