โ05-20-2024 05:26 AM
Hi, I'd like to test IF variable a is equal to something AND variable b is either equal to value 1 OR value 2.
I've set up the IF condition similar to below, but can't seem to get the IF condition to evaluate true when variable b is equal to value 2. I can use a more drawn-out set of nested IFs, but I wondered if anyone can help me work out what I'm doing wrong?
IF condition:
IF evaluates false when variable b is equal value 2:
Cheers,
Dan.
Solved! Go to Solution.
โ05-20-2024 07:36 AM - edited โ05-20-2024 07:36 AM
You can do it all in a single conditional like this:
##IF variable a is equal to something AND variable b is either equal to value 1 OR value 2
variable_a == something && (variable_b == value1 || variable_b == value2)
โ05-20-2024 07:36 AM - edited โ05-20-2024 07:36 AM
You can do it all in a single conditional like this:
##IF variable a is equal to something AND variable b is either equal to value 1 OR value 2
variable_a == something && (variable_b == value1 || variable_b == value2)
โ05-20-2024 07:45 AM
Thanks Gary, that works perfectly!