Sharepoint

Sharepoint 2010 – Execute Workflow only on change of a particular list column

Sharepoint 2010 allows for automating tasks through Workflows. These tasks may range from approval to coordinating group efforts to issue tracking. SharePoint Designer is used to create Declarative Workflows. A declarative workflow is built from conditions and actions. These are arranged into rules and steps that set the parameters for the workflow. Did I mention all this happens without writing any code?

The Issue: I had to create an approval workflow that would be executed whenever the ‘Status’ column of a custom SharePoint list changed. Out of the box (OOTB) SharePoint allowed me to create a declarative workflow that would be executed every time any items in the list were updated. But I didn’t want it execute every time, only when a specific column in the list was updated. And I had to do it OOTB using SharePoint Designer only.

The solution: By following the following steps I was able to follow the project specifications without following any faulty practice.

I created a dummy column in the list of the same type as ‘Status’ column.
The workflow then used the following algorithm whenever the List item changed event fired:

  • Compare the values in ‘Status’column and the dummy column.
  • If the values are different,
    • //Write the stuff your workflow is supposed to do
    • Change the value of the dummy field to the new ‘Status’ value.

Enjoy.

PS. I’m a SharePoint developer by day and an Android developer by night. Sometimes, the days are too long and I’m unable to spend any time for Android.

Advertisements

2 thoughts on “Sharepoint 2010 – Execute Workflow only on change of a particular list column

  1. Sharepoint 2010

    We are using Publishing major version option with OOB Publishing workflow on shared documents.

    We have designed a custom workflow to send email notifications to different users when a document is approved. Some how its not working i think step condition is not correct.

    Can anyone pls advise on it.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s