Forum Discussion

awood's avatar
awood
Qrew Member
2 days ago

Combining AND with OR in Formula Checkbox Field

Hi all,

I'm trying to set up a checkbox that gets checked when a number of conditions are specified. Here's my current formula:

If(Contains([Type],"Leader")
or Contains([Type],"Managing")
or Contains([Type],"Associate")
and [Forecast Due Date]=Today()
and [Revenue]=0
and [Work Status]="Active"
and [Frequency of  Pay] = "Monthly"
,true
,false)

Everything works fine except for the Contains, which I feel like I've tried just about every permutation of. Basically I need each of the conditions after the Contains to be true, AND I need one of the 3 Contains conditions to be true, after which I want my checkbox to be checked. From my results it feels like it's stopping at the OR statements and checking the box if any of them is true.

Any help would be appreciated!

  • Try this

    IF(

    (Contains([Type],"Leader")
    or Contains([Type],"Managing")
    or Contains([Type],"Associate"))


    and [Forecast Due Date]=Today()
    and [Revenue]=0
    and [Work Status]="Active"
    and [Frequency of  Pay] = "Monthly"
    ,true
    ,false)

     

  • awood's avatar
    awood
    Qrew Member

    As per usual with my formula woes, it came down to placement of parentheses! Thank you so much! 

  • Try this

    IF(

    (Contains([Type],"Leader")
    or Contains([Type],"Managing")
    or Contains([Type],"Associate"))


    and [Forecast Due Date]=Today()
    and [Revenue]=0
    and [Work Status]="Active"
    and [Frequency of  Pay] = "Monthly"
    ,true
    ,false)