I've got a couple of custom fields to track an accreditation process. The first is a simple yes/no and the second is a date field. When the first gets set to yes, ad a date is entered in the second, I want a CiviRule to be triggered that sends an email.

I can setup a rule where the trigger is that the custom data for an individual is changed, which seems reasonable. Then I'm looking at conditions to try to refine the circumstances where the action is triggered. It looks like all I can do is compare field values. So if I set the first condition such that the first field = 'yes', and a second condition such that the date field must contain a date (i.e. not be empty/null) then that sort of defines what I'm looking for. and sure enough, when I edit a record such that the conditions are met, the rule fires and the email gets sent.

However, having set this up, it looks like any subsequent change to any other custom field on that record would surely also meet the terms of the trigger and the conditions, despite the fact that the two fields that I'm interested in aren't changed.

How can I define a rule that will only fire when I change one or both of the two target fields, and only when the data in those fields meet my conditions?

  • I'm thinking that if the rule has an additional action to add a tag (or an activity), and an an additional condition to check for the tag/activity, such that it only fires when the tag/activity is absent, this might be a way forward. Not foolproof, as the tag/activity could be removed by someone, but it's something. – Graham Feb 20 '19 at 10:15

Your Answer

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

Browse other questions tagged or ask your own question.