Use Multiple Conditions for Notifications and Data Routing

We’re excited to announce that you can now use multiple conditions for your email notifications and for your Data Routing rules!  This means that you can now check more than 1 condition is met before running the action.  When testing multiple conditions, you can either use an “And” or an “Or” to indicate what conditions need to be met.

A little bit more about how our algorithm works for these conditions… We loop through each of your conditions and test each one individually.  If the result is “true” and the operator is an “Or”, we exit the loop and run the action.  If the result was “false” operator was an “And” we continue on to the next condition.

Here are some examples of what the end result will be for combinations of true and false conditions:

(true AND true AND true) = true

(true AND false AND true) = false

(true AND false OR true) = true

(true OR false OR true) = true

(false AND false AND false) = false

(false OR false OR false) = false

To use this new feature, simply click the [Add another condition] link underneath your default condition when editing your Notification Emails and Data Routing rules.

Have more questions? Submit a request

9 Comments

  • Avatar
    Damian Thurnheer

    So I have an issue with this. First I set it up the wrong way - but corrected it the way it should be:

    Condition A
    AND Condition B
    OR Condition C

    In any case condition A is false, the Document should not be generated, right? But in my case the file is generated, even though Condition A is false.

    My set-up is:
    Condition A =Equals AD
    AND Condition B contains BE
    OR Condition C contains CF

  • Avatar
    Damian Thurnheer

    in my case it should be:
    true AND false OR true = true
    false AND true OR false = false
    false AND false OR true = false

    or did I get this wrong?

  • Avatar
    Jeremy Clarke

    Hi Damian,

    Yes, that's correct. All 3 of those examples are correct. If you continue to have problems, submit a support ticket and we can help you. Sometimes it is tough to mix & match the and's and or's

    Thanks!

  • Avatar
    Brian Hage

    Is it possible to check array in the data routing rules? I was trying {array($files)} "Does Not Contain" and it was not working right. Is there a way to check the whole array for a value? Thanks!

  • Avatar
    Jeremy Clarke

    Hi Brian,

    You can use the in_array() function like this:

    {if in_array("Search", $files)}yes{/if}

    then put Equals "yes" for the value of the logic.

  • Avatar
    Brian Hage

    This is great, thank you!

  • Avatar
    Forrest Chamberlain

    How is this treated with more than three conditions. For example:

    True and True or False or False or False
    Is that equal to:

    (True and True) or False or False or False
    or
    True and (True or False or False or False).

    I assumed it was the later, but my tests seem to be indicating otherwise.

     

    What about:
    (True and True) or (True and True) or (False and False) or (True and True)? Is that correct?

    Edited by Forrest Chamberlain
  • Avatar
    Jeremy Clarke

    Hi Forrest,

    It actually just does them in order without any grouping, so that would equal False. If you have logic you'd like to mix with And's and Or's we suggest choosing <> from the field dropdown, then entering your logic like:

    {if ($foo == "bar" or $bar == "blah") and $total > 0}true{/if}

    Then entering "true" in the value box.

    We are working on a fix for this "mixing" issue, but don't have one yet so this is the best solution.

    Thanks!

  • Avatar
    Forrest Chamberlain

    Cool. Thanks for the always prompt support.

Please sign in to leave a comment.
Powered by Zendesk