My expression, unfortunately, stays red. I can’t get it to work.

I’m using the advanced expression editor and am simple trying to the following:

IF ((a AND b) OR (c)) = YES/NO

Here are the real screenshots:


^^^^this is the (a AND b) part


^^^ this is the (c) part


^^^^^ this is the whole thing together ((a AND b) OR (c))

It stays red even though it’s correct when i hover over the parenthesis. You can see in the first screenshot I’m hovering over (a AND b) and it lights that up. Next pic I hover over (c) and it lights that up. Last pic, I hover over OR and light the whole expression up.

It says it evaluates to a yes/no. It’s correct. But it’s RED!

What is wrong here?

arbitary text vs transactions from agree is invalid argument

you probably want from_agree name is arbitiary text or something similar

you’re trying to compare a thing to a text
you need to compare a text to a text

1 Like

Thanks for catching that. i’ll adjust it. I did a fairly convoluted move there because “from_agree” is a yes/no boolean datatype. However, I left it uninitialized in the database. In the popup menu, I couldn’t select anything to see if it was “not yes” so I cast it to a text value then checked that text value against arbitrary text of “yes.:”
I’ll change my database structure to give “from_agree” a default value of “no” which will hopefully get around the issue. Thanks for suggesting this. I’ll respond back with an update for the thread.

Interesting. I split it up just to test it out. I put everything before the OR into one condition and everything after the OR in a second condition. I didn’t change anything else. And it went blue.

In retrospect, this is what I should have done anyway for the OR since Bubble is set up to work this way and it simplifies things a lot.

1 Like