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.
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.