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

**URL:** <https://community.glideapps.com/t/in-the-if-then-column-can-you-add-a-and-statement/43132>\
**Category:** Ask for Help\
**Created:** [June 16, 2022, 2:26am UTC](https://community.glideapps.com/t/in-the-if-then-column-can-you-add-a-and-statement/43132 "2022-06-16T02:26:46Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![moshi](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/moshi/32/43745_2.png) [@moshi](https://community.glideapps.com/u/moshi)\
**Post date:** [June 16, 2022, 2:26am UTC](https://community.glideapps.com/t/in-the-if-then-column-can-you-add-a-and-statement/43132/1 "2022-06-16T02:26:46Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Darren\_Murphy](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/darren_murphy/32/47326_2.png) [@Darren\_Murphy](https://community.glideapps.com/u/Darren_Murphy)\
**Post date:** [June 16, 2022, 2:38am UTC](https://community.glideapps.com/t/in-the-if-then-column-can-you-add-a-and-statement/43132/2 "2022-06-16T02:38:01Z")

</div>

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.

> [@moshi](#):
>
> IF (A && B) → C

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

> [@moshi](#):
>
> IF (A || B) → 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

---

<div class="post-metadata">

**Author:** ![moshi](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/moshi/32/43745_2.png) [@moshi](https://community.glideapps.com/u/moshi)\
**Post date:** [June 16, 2022, 2:57am UTC](https://community.glideapps.com/t/in-the-if-then-column-can-you-add-a-and-statement/43132/3 "2022-06-16T02:57:22Z")

</div>

> [@Darren\_Murphy](#):
>
> 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

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.

---

<div class="post-metadata">

**Author:** ![Darren\_Murphy](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/darren_murphy/32/47326_2.png) [@Darren\_Murphy](https://community.glideapps.com/u/Darren_Murphy)\
**Post date:** [June 16, 2022, 3:04am UTC](https://community.glideapps.com/t/in-the-if-then-column-can-you-add-a-and-statement/43132/4 "2022-06-16T03:04:37Z")

</div>

> [@moshi](#):
>
> 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

---

<div class="post-metadata">

**Author:** ![moshi](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/moshi/32/43745_2.png) [@moshi](https://community.glideapps.com/u/moshi)\
**Post date:** [June 16, 2022, 3:18am UTC](https://community.glideapps.com/t/in-the-if-then-column-can-you-add-a-and-statement/43132/5 "2022-06-16T03:18:48Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Darren\_Murphy](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/darren_murphy/32/47326_2.png) [@Darren\_Murphy](https://community.glideapps.com/u/Darren_Murphy)\
**Post date:** [June 16, 2022, 3:29am UTC](https://community.glideapps.com/t/in-the-if-then-column-can-you-add-a-and-statement/43132/6 "2022-06-16T03:29:53Z")

</div>

> [@moshi](#):
>
> It’s very foreign for me to think that way, when programming it’s usually the other way around.

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.

---

<div class="post-metadata">

**Author:** ![system](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/system/32/53398_2.png) [@system](https://community.glideapps.com/u/system)\
**Post date:** [June 17, 2022, 3:30am UTC](https://community.glideapps.com/t/in-the-if-then-column-can-you-add-a-and-statement/43132/7 "2022-06-17T03:30:42Z")

</div>

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