2

I've got a list, which has two SharePoint Designer workflows running on them. Both are fairly simple workflows. The first workflow, New Request is initiated on item creation, and it set's a field value based on some conditional logic I have set up. The second workflow, Change Notification, is initiated on item changed, and just sends out an e-mail upon item change.

My problem is, that the New Request workflow, when it sets the item field value, kicks off the Change Notification workflow, which I do not want to happen. I tried creating an "If Current Item:Created equals Current Item:Modified" branch, hoping it would catch the change from the New Request workflow, but the Change Notification e-mail is still getting triggered. In essence, I'm attempting to create a condition that can detect whether the change was made by a user, or simply the field being set in the New Request workflow.

I thought I might be able to set up a simple list alert, but as I need the alert to be sent to the person specified in a field, this solution doesn't meet the business need. I even tried to create a calculated column, called "Diff", with a formula of =IF((Modified-Created)>0.01, "New", "Not New")

Workflow ScreenShot

However, the email I receive every time is from the "else" branch at the end.

3
  • How comfortable would you be with creating a Visual Studio event receiver? IMO this is really an ideal situation to use one of those. Commented Sep 19, 2012 at 23:50
  • I would be comfortable using an event receiver on the list, unfortunately, the client I'm helping out with this is not. I'm going to try putting a pause on the Change Notification workflow, I think it is firing off before the New Request workflow I made is complete. My only other hope is to create a hidden field which the New Request workflow will set to "New", and having the "If" condition to set that field to "Existing", then check for that field to be "Existing" before it sends off the Change Notification e-mail. Commented Sep 20, 2012 at 13:21
  • 1
    Dang clients, always gettin' in the way! ;-) I think your hidden field idea is a good one. Good luck. Commented Sep 20, 2012 at 14:09

2 Answers 2

0

I ended up creating a hidden field, called NewItem, which by default was set to yes. In the Change Notification workflow, if the field equaled "Yes", I changed the field to "No", and ended the workflow. Else if, the field equaled "No", then the Change e-mail would be sent out. I'm not sure why this worked, and my logic involving the Diff column did not work. I'd have to guess that the Change Notification workflow was being kicked off before the Diff column was being re-calculated?

0

Your last logic may have worked if you added an "or" statement. Else If Current Item:Diff not equal "New" or If Current Item:Diff not equal "Not New" Email Andrew Fitzpatrick

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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