Conditional custom logic not working

  • 1
  • Problem
  • Updated 3 years ago
I have a conditional render on a button with custom logic (1 AND 2 AND 3) OR 1 OR 4. So basically I want the button to show if 1-3 all evaluate to true or when 1 or 4 evaluate to true. 

It is almost like when you throw the "or" in there it gets messed up. I tested each condition alone and know that they are working. When they all come together they stop working. 

I have seen a few threads about issues with the custom logic on conditional rendering and am wondering if this is a bug?
Photo of Tami Lust

Tami Lust

  • 5,280 Points 5k badge 2x thumb

Posted 3 years ago

  • 1
Photo of Rob Hatch

Rob Hatch, Official Rep

  • 44,006 Points 20k badge 2x thumb
When you say they stop working, what do you mean?  Is a javascript error thrown in the console? 
Photo of Tami Lust

Tami Lust

  • 5,280 Points 5k badge 2x thumb
Rob,

Do you have any update whether this is a bug?
Photo of Tami Lust

Tami Lust

  • 5,280 Points 5k badge 2x thumb
When I say stop working I mean that the custom logic is not being followed. The button still shows even though based on the custom logic the button should not show.  
Photo of Matt Sones

Matt Sones, Champion

  • 31,478 Points 20k badge 2x thumb
Tami...

Not sure I understand your logic.

(1 AND 2 AND 3) OR 1 OR 4

That's the same thing as

1 OR 4

Because if 1 evaluates to true, then the whole expression is true.

Are you sure you've written the custom logic correctly?