Condition builder - multiple conditions at once

Is there a workaround for having a condition that has both “satisfy all” and “satisfy any” ? i.e

Case 1.

Satisfy any of the following:
state of panel X equals Y
state of panel X equals Y
state of panel X equals Y
state of panel X equals Y

together with

Satisfy all of the following:

state of panel W equals Z
state of panel W equals Z
state of panel W equals Z
state of panel W equals Z

Then:

Hi AntonMircea ,
At the top of the condition builder there’s a menu that says “all,” but you can change it to “any” to get the OR operator.
Thanks,
Vikram

Hi Anton -

Do you want to test a condition that ANDs together both an AND condition and an OR condition like the following?

if (a equals b [b]AND[/b] c equals d) [b]AND[/b] (e equals f [b]OR[/b] g equals h)

If so, the condition builder doesn’t provide any such logical grouping or nesting.

You could accomplish this by breaking it into two different satisfy ALL conditions with an intervening else:

if a equals b and c equals d and e equals f
– code goes here
else if a equals b and c equals d and g equals h
– very same code goes here

Yes, yuck! - but it works.

If you are using global variables or values that can be acquired using temporary variables (in the fx box), you could accomplish the above using Boolean operators:

if value [[ (a == b && c == d) && (e == f || g==h) ]] equals value TRUE

Sometimes you can simplify your logic if you reframe

1 AND 2 AND 3 AND 4

as

NOT (1 OR 2 OR 3 OR 4)

and start there. Example attached.

Jeff
any and all.rp (61.6 KB)

Thanks josephxbrick!

Thanks Jeff_Harrison!