If you are using Exact Synergy, have you ever wanted to have Exact Event manager send an email when a particular workflow task or request is completed, but only in certain situations?
Exact Event Manager triggers on certain criteria are a great way to do this, but if the keyed data isn't exactly what you want, the email may not be initiated. If you instead use a Free Yes/No Field (checkbox field) however, you can limit the trigger to two criteria: "send" or "don't send". This means your trigger may look like this:
WHERE dbo.Absences.FreeBoolField_05 = 1
AND dbo.Absences.Type IN ( 102 , 200 )
The value of "1" indicates that the box is in a checked state. The second line adds additional conditions to the trigger: in this case, the request is one of 2 specific types.
Once you complete the rest of the EVENT, you can have the email send off to a particular recipient when the box is checked.
But what if you want to trigger the same email multiple times from the same request?
I was able to solve this problem by adding a little SQL update script to the end of my EVENT. In addition to sending an email when the event is triggered by the above script, my event also runs the following:
update Absences set FreeBoolField_05=0 where HID={HID} and FreeBoolField_05=1
What does this do? Well, it simply resets the checkbox from a checked state, to an unchecked state! And the "where" clause defines the specific job that JUST triggered. The only thing that remains to be done is to allow the job to run multiple times. This is accomplished under the Description Tab of the Event under the checkbox "Repeat notification for triggered items." If that box were left unchecked, the email would never send again, even if you had checked the box again.
That's it!