In the If/Then Column can you add a "AND" statement?

Is there a way you can create a scenario like this:
IF (A && B) → C
IF (A || B) → C

Or is it restricted to just If A → B? If so, what are some clever solution to try to add the “AND” statement?

Thank you community, I promise one day I’ll stop being a noob and actually contribute aha

The most important thing to understand about the if-then-else column is that it will return (short circuit) as soon as a condition passes. So the best approach is what we sometimes refer to as “working backwards”, by eliminating all the false conditions first.

I’m reading that as if (A and B) and C

  • If not C, then false
  • If not A, then false
  • If not B, then false
  • Else true

Or maybe it’s supposed to be if A and B, then C?
In which case:

  • If not A, then false
  • If not B, then false
  • Else C

I’m reading that as If (A or B) and C

  • If not C, then false
  • If A, then true
  • If B, then true

…or should that be If A or B, then C?
If yes, then:

  • If A then C
  • If B then C
3 Likes

the idea is: IF A is true AND B is true then output C.

In your example it shows IF A isn’t true AND B isn’t true then C. which is different.

Is there a way to use these short circuits to verify two variables.

What I specifically need is (If string is “X” AND Date is before Y) then C, else FALSE.

Just reverse your logic:

  • If string is not X, then false
  • If date is after Y, then false
  • Else C
3 Likes

Oh, okay I see what you’re saying. It’s very foreign for me to think that way, when programming it’s usually the other way around.

Thank you Darren

Yeah, it takes a bit of getting used to, and seems non-intuitive at first. But as I say, the trick is to reverse your logic and work backwards.

3 Likes

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.