Friday, January 11, 2013

Can I Setup an alert on a SharePoint 2010 view filtered by a workflow status?

I was trying to receive alerts from a list upon a failed workflow. So I created the filtered view by the workflow's status (as explained in the previous post), and clicked the Alert Me button. There I entered the setting and clicked the views' dropdown to apply to my new view.
What a surprise.... The view was missing from the view list. After several attempts I concluded that views that are filtered by a workflow status won't show in the Alert Me dropdown.
So I tried to cheat the system. I created a view, setup the alerts first, and than filtered it by the workflow variable. Unfortunately it didn't work. I was receiving alerts according to the original filter.
If someone has a solution for this issue it would be good to konw.

How to filter a SharePoint list by a workflow status

When you create a workflow on a list or library, SharePoint adds a new column to the list showing the workflow's status. You can add this column to a view and you can sort by it. However, when you try to filter by this column, to show only the Status = Canceled rows for example, you will get an emty list.

The reason is that the workflow's status is really a numeric value. So for the Canceled status you need to enter 15 and Completed = 5. I found this solution after I added the column to the view and exported the list to Excel. There I saw the numeric values.