1. "Fabrik 4" helpers needed!

    You are invited to join other community members active in coding, maintaining and improving Fabrik. Please visit https://fabrik.help for more information!
    Dismiss Notice

Cron Email - Multiple Conditions PHP

Discussion in 'Standard Support' started by jsnider, Jul 22, 2013.

  1. jsnider

    jsnider Member

    Level: Community
    I have been able to set up scheduled cron emails that work great when I only have one condition. This condition works:

    return '{issues___project}'=='Amistad Apartments';

    I am trying to do a second condition, but when I add && or AND to the condition, it doesn't work. Can someone help me with the proper syntax to add another condition? Here is an example of what I have tried:

    return '{issues___project}'=='Amistad Apartments' AND '{issues___status}'=='Open';

    Thanks so much.
  2. jsnider

    jsnider Member

    Level: Community
    OK - as is the magic of the forum, as soon as I posted it, I found a string that worked. For others browsing through, here it is:

    return '{issues___status_raw}'=='Open' AND '{issues___project}'=='Amistad Apartments';

    The "raw" string seemed to help.

    JackGoa and cheesegrits like this.
  3. nfatsis

    nfatsis New Member

    Level: Community
    Thank for the tip jsnider
  4. cheesegrits

    cheesegrits Support Gopher Staff Member

    Level: Community
    Use && rather than AND. They are almost the same, but not quite, and if you routinely use AND you will at some point get bitten by the difference. Always best to use && for simple boolean operations like that.

    The issue is operator precedence, see first answer ...


    -- hugh

Share This Page