Camenwolf
Camenwolf

Reputation: 798

How can I tell what change initiated a workflow?

If I configure a workflow to start when an item is changed, how can I tell which field changed to initiate the workflow? What I have in mind is I really only want the workflow to fire if one particular field changes and fall through any other time.

Upvotes: 1

Views: 6031

Answers (2)

brian brinley
brian brinley

Reputation: 2364

Your title is a bit different than your question so i'll answer what I think is your question with a tutorial article.

http://sharepointsolutions.blogspot.com/2007/10/sharepoint-designer-workflows-how-to.html

Upvotes: 0

Paige Watson
Paige Watson

Reputation: 1214

In simple terms, you can't.

Workflows don't hold "pre-change" and "post-change" properties like some events do.

The only thing you can do in a workflow is to check if a field value is "==" or "!=" to a value.

Some possible workarounds:

  1. What you can do is write a event reciever to catch the list item updating event and then act on the data. James Love explained this in a great answer to "How can I detect whether a specific column changed in an SPItemEventReceiver.ItemUpdated event (SP 2010)?".
  2. You can add a "hidden" field to the list that gets updated by the workflow when the list changes. This would hold the "old" value. Not practical, but simpler to implement than an event receiver.

Upvotes: 1

Related Questions