Learn more about SQL Server tools

mssqltips logo
 

Tutorials          DBA          Dev          BI          Career          Categories          Webcasts          Whitepapers          Today's Tip          Join

Tutorials      DBA      Dev      BI      Categories      Webcasts

DBA    Dev    BI    Categories

 
Simplify SQL Server Database Development     ====>    Webcast Registration
 

Automating the Manual Start of a SharePoint Workflow


By:   |   Read Comments   |   Related Tips: > Sharepoint

Problem

When planning a SharePoint Workflow, sometimes you just need to let the user initiate it manually. But the standard interface is awkward. First the user must find the item dropdown, then select "Workflows", then (assuming they pick the right one). they must click on it...and then click "Start". That's too many steps and leaves too much to chance. Here's a better way...

Solution

Note: This tip assumes you already know how to create a simple workflow using SharePoint Designer 2007 or 2010. If you need a step by step tutorial on creating workflows, check out the tip on creating a Helpdesk.

The solution is to create a new column (Yes/No), and to use that column to trigger the workflow. The user initiates the workflow by simply checking the box and saving the item. The workflow does the rest.

This solution works for both document libraries and other SharePoint lists for WSS3, MOSS2007, SharePoint 2010 and SharePoint 2010 Foundation. Here are the basics...

Create a new column of the type Yes/No. This will make a checkbox on the form. In this example, I use the Column name "Send Referral Status Update". You can change this to whatever is appropriate for your business process.

send referral status update

Let's take a look at what the column looks like to the user:

save

Once created, I use SharePoint Designer to create a new workflow based on the library or list.

workflow settings

In the workflow, I set the Workflow Settings to start whenever an item is created or changed.

start workflow

"Hey what's this all about, Rob? I thought you said this was going to be a manual workflow."

It is, it is. Just not one the user has to do the old fashioned way (see Problem).

The trick is to set a condition prior to creating the workflow action. The workflow checks to see if the column I created is checked (which means "Yes").

Then, in the workflow designer, I set that as a condition. Then I proceed with creating the Action.

refferal status

In this case, the "Action" that follows the condition is to send a targeted email.

recent actions

One last bit of clean up. After the desired action is complete, I reset the checkbox as unchecked. That way, if other fields are updated, the workflow does not get repeated unintentionally.

current item

There you have it.  A simple, but elegant solution to providing a workflow that is initiated by the user based on a condition. Obviously, you can get creative with the conditions and workflow login. But the point is, to make it easy for users.

Next Steps
  • For a more thorough, step by step tutorial on how to create a basic workflow, follow the tip on this site on creating a Helpdesk.


Last Update:


next webcast button


next tip button



About the author
MSSQLTips author Rob Fisch Rob Fisch has worked with SQL Server since version 6.5 as a dba, developer, report writer and data warehouse designer.

View all my tips





Post a comment or let the author know this tip helped.

All comments are reviewed, so stay on subject or we may delete your comment. Note: your email address is not published. Required fields are marked with an asterisk (*).

*Name    *Email    Email me updates 


Signup for our newsletter
 I agree by submitting my data to receive communications, account updates and/or special offers about SQL Server from MSSQLTips and/or its Sponsors. I have read the privacy statement and understand I may unsubscribe at any time.



    



Learn more about SQL Server tools