I am new to SharePoint but I learn quick.
I want to trigger a workflow only when a value is updated in a list item, but not everytime the item is changed. For example I have a column for approve/not approve and I want that to be the trigger not the other values in the item. So if anything else is changed the workflow will not start unless the ‘approval’ value is.
All help is appreciated!
Thanks,
If you wish to accomplish this programmatically…
Create a ItemUpdating event handler and attach it to your target list. I would create a feature and feature receiver to do the attaching.
In the ItemUpdating event handler, there are two values you want to look at:
properties.ListItem[“Approval”] this will give you the original value
properties.AfterProperties[“Approval”] this is the updated value
Check if the two values are not equal to each other, and if the updated value is equal to “approve”. If both are true, start a workflow on the list item programmatically- here are some links to help you with that:
http://www.tonytestasworld.com/post/Howto-Start-a-Sharepoint-Workflow-Programmatically.aspx
Happy coding!