And/or in conditionals

Hi, I have a conditional that has references one thing in DB with several fields

i.e. Field 1 is tree and field 2 is water and field 3 is field 4

but there is another additional possibility where only one field is different

i.e. Field 1 is tree and field 2 is water and field 3 is field 4 or Field 1 is tree and field 2 is liquid and field 3 is field 4

when I run this on the page it works when it is only the part before or but when I run the whole thing it comes out as false even though everything should be okay.

I think about and/or as in everything combined by and is one function(ish) then or starts a new function(ish)

this has worked for my other things but not this one. Can someone explain pls?

To make it work as you intend you need parentheses (you need to enable experimental features Introducing beta (previously, experimental) features (including parentheses)!) because otherwise the operations will be computed left to right without knowledge of the grouping you have in mind.

You want to do (Field 1 is tree and field 2 is water and field 3 is field 4) **or** (Field 1 is tree and field 2 is liquid and field 3 is field 4)

or alternatively Field 2 is liquid or field 2 is water and field 3 is field 4 and Field 1 is tree

1 Like

Awesome thank you so much @dorilama !!

Happy to help :slight_smile:

Cheers
Mariano

1 Like