Why the difference in formula results

I am running a logic check in a workflow and am getting a difference in results depending on how I frame the statement as below,

In both instances OrdersMenu is false, but I get two different results.

Isn’t

If (OrdersMenu = 'true' , 'flex','none') 

the same as

OrdersMenu ? 'flex' : 'none'

Thanks

looking at your code your retuning “true“ not true and false. “false“ as a string is true just like ‘this is true‘. in your weweb formula your doing ordersMenu = ‘true‘ if you made that just ordersmenu or = true with no quotes it would be have the same as the tenerary operator.

Value Boolean equivalent
false false
"false" true
0 false
"0" true
"" (empty string) false
" " (space) true
null, undefined, NaN false
1 Like

Thanks, I figured it out.

The ternary was evaluating incorrectly as the variables were set to text and not boolean.

2 Likes