How would I be able to require multiple criteria in order for an if-then-else statement? In C# terms,
if(a && b){
return true;
} else{
return false;
}
Currently, the if-else statement evaluates it as true if at least one condition is met, which I do not want. Is there a way to work around this? Thanks
The way to do this is to flip your logic around. So…
- If a is not true, then false
- If b is not true, then false
- Else true
PS. @ARandomBanana I used not true
instead of false
in that example for a reason. Columns will often have an initial state of empty
. This is the case with boolean columns. A boolean column in its default new state (empty) will be neither true or false. So testing for not true
covers both the default state (empty
), and false
.
1 Like
Oh! Sorry, I’m not very good at thinking backward. Thanks for the help
1 Like