2

I have two SharePoint Designer 2007 workflows associated with a "Request" list.

The first workflow automatically fires whenever a new request is submitted and sends an email to the requester.

The second workflow automatically fires whenever an existing request has been modified, sending a different email to the requester.

I have a hidden field on my list that I am using as a sort of "dirty bit". In my first workflow, I'm using the "Set Field Value" action to initialize the value. Once this workflow sets the field value, it actually causes the second workflow to be triggered.

I have been trying to come up with a way to prevent this from happening but I've yet to come up with a solution. Please keep in mind that these are Designer Workflow and I am unable to use any sort of coded solution.

Thanks in advance,

Will

1

You have to put in some logic on the change workflow to exit appropriately as well as edit your dirty bit field appropriately.

Your on start workflow sets the field, then your on change workflow needs to check against that and escape, presumably if the field is set and the modified by person is the creator (since the on creation workflow executes under the context of the person who creates the item). If that is the case the workflow terminates, if it isn't, then the workflow would email out and then set your dirty bit flag to completed. If the workflow refires and it sees the dirty bit flag is complete, then it terminates.

You basically have to build in exit conditions into your flag and have the on change workflow evaluate it before sending the email.

1

If it's running EVERY time you create an item, then have a boolean (yes/no) field called something like "firsttime" that has a default value of yes.

Use this as a condition for running the "on change" workflow, (if no, then run block) and at the end, set the value of this field to be no.

You may also want to have a "wait" call for 1 minute or so to let the "on create" workflow finish entirely. (to avoid possibly running the "on change" multiple times.)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.