# We cannot create filters that are AND as well as OR, correct?

**URL:** <https://community.glideapps.com/t/we-cannot-create-filters-that-are-and-as-well-as-or-correct/14369>\
**Category:** Ask for Help\
**Created:** [August 21, 2020, 10:29pm UTC](https://community.glideapps.com/t/we-cannot-create-filters-that-are-and-as-well-as-or-correct/14369 "2020-08-21T22:29:31Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![Deena](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/deena/32/9877_2.png) [@Deena](https://community.glideapps.com/u/Deena)\
**Post date:** [August 21, 2020, 10:29pm UTC](https://community.glideapps.com/t/we-cannot-create-filters-that-are-and-as-well-as-or-correct/14369/1 "2020-08-21T22:29:31Z")

</div>

For example:

email is signed in user OR  
email is team manager  
AND  
archived is not true

I have not found a way to do this and I really want to! 😁 Just checking to make sure I’m not missing anything!

---

<div class="post-metadata">

**Author:** ![Jeff\_Hager](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/jeff_hager/32/43_2.png) [@Jeff\_Hager](https://community.glideapps.com/u/Jeff_Hager)\
**Post date:** [August 21, 2020, 10:33pm UTC](https://community.glideapps.com/t/we-cannot-create-filters-that-are-and-as-well-as-or-correct/14369/2 "2020-08-21T22:33:50Z")

</div>

You are correct, but you can get creative by creating your AND’s in the data editor and just use the OR’s in the filter.

---

<div class="post-metadata">

**Author:** ![Deena](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/deena/32/9877_2.png) [@Deena](https://community.glideapps.com/u/Deena)\
**Post date:** [August 21, 2020, 10:38pm UTC](https://community.glideapps.com/t/we-cannot-create-filters-that-are-and-as-well-as-or-correct/14369/3 "2020-08-21T22:38:16Z")

</div>

Thank you Jeff! How would I put the and’s in the data editor? sorry haha- I am still learning every day!

---

<div class="post-metadata">

**Author:** ![John\_Cabrera](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/john_cabrera/32/2066_2.png) [@John\_Cabrera](https://community.glideapps.com/u/John_Cabrera)\
**Post date:** [August 21, 2020, 10:42pm UTC](https://community.glideapps.com/t/we-cannot-create-filters-that-are-and-as-well-as-or-correct/14369/4 "2020-08-21T22:42:05Z")

</div>

You’d just create a column in the data editor that creates all the conditions you need with AND. Then that column would be one of the OR columns in the component you’re filtering.

---

<div class="post-metadata">

**Author:** ![John\_Cabrera](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/john_cabrera/32/2066_2.png) [@John\_Cabrera](https://community.glideapps.com/u/John_Cabrera)\
**Post date:** [August 21, 2020, 10:57pm UTC](https://community.glideapps.com/t/we-cannot-create-filters-that-are-and-as-well-as-or-correct/14369/5 "2020-08-21T22:57:55Z")

</div>

For example:

I want the component to filter when Color 1 is Red AND Color 2 is blue OR Color 3 is green.

In the Data Editor I create an IF - THEN - ELSE column called “Colors 1\_2” that checks the Color 1 and Color 2 columns and IF Color 1 is Red THEN true, IF Color 2 is not Blue THEN false, IF Color 2 is Blue THEN true, IF Color 1 is not Red THEN false.

That column will check each condition one after the other and should give you “true” if Color 1 has Red AND Color 2 has Blue… but “false” if either of them doesn’t have its Red or Blue respectively.

Great.

Now go back to your component and filter it as such: Color 1\_2 is true OR Color 3 is Green.

---

<div class="post-metadata">

**Author:** ![\_eric](https://avatars.discourse-cdn.com/v4/letter/_/5f9b8f/32.png) [@\_eric](https://community.glideapps.com/u/_eric)\
**Post date:** [August 21, 2020, 11:00pm UTC](https://community.glideapps.com/t/we-cannot-create-filters-that-are-and-as-well-as-or-correct/14369/6 "2020-08-21T23:00:17Z")

</div>

John what about when you have tiered and/or conditions?

And this image just involves two tiers…

![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/2X/3/3f2e48f726fc1fbaf83d683c850de1d17f20eac1.png)

---

<div class="post-metadata">

**Author:** ![Deena](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/deena/32/9877_2.png) [@Deena](https://community.glideapps.com/u/Deena)\
**Post date:** [August 21, 2020, 11:00pm UTC](https://community.glideapps.com/t/we-cannot-create-filters-that-are-and-as-well-as-or-correct/14369/7 "2020-08-21T23:00:51Z")

</div>

Ah, okay, now I get it. Thank you so much for the detailed explanation. I have used If/Then/Else but I didn’t think about it for this use case.

---

<div class="post-metadata">

**Author:** ![John\_Cabrera](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/john_cabrera/32/2066_2.png) [@John\_Cabrera](https://community.glideapps.com/u/John_Cabrera)\
**Post date:** [August 21, 2020, 11:02pm UTC](https://community.glideapps.com/t/we-cannot-create-filters-that-are-and-as-well-as-or-correct/14369/8 "2020-08-21T23:02:02Z")

</div>

Having trouble understanding what you mean and I could probably get it if I could see the image, but it’s tiny and my eyes just aren’t what they used to be lol

---

<div class="post-metadata">

**Author:** ![Robert\_Petitto](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/robert_petitto/32/25193_2.png) [@Robert\_Petitto](https://community.glideapps.com/u/Robert_Petitto)\
**Post date:** [August 21, 2020, 11:52pm UTC](https://community.glideapps.com/t/we-cannot-create-filters-that-are-and-as-well-as-or-correct/14369/9 "2020-08-21T23:52:15Z")

</div>

> [@new New containing screen context for conditions](https://community.glideapps.com/t/new-containing-screen-context-for-conditions/12316/5):
>
> [https://www.youtube.com/watch?v=gP2MWN0udU0&t=320s](https://www.youtube.com/watch?v=gP2MWN0udU0&t=320s) If you need to have an AND and an OR condition, use an if-then-else column first. For example, let’s say you want to a list of events that can only be edited by the event owner OR any app Admin AND only if the event hasn’t happened. Here’s how: Create an if-then-else column in the data table from where the component resides (let’s name this column “Editors”) Create your OR condition within this if-then-else column. For example, if you wa…

---

<div class="post-metadata">

**Author:** ![Deena](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/deena/32/9877_2.png) [@Deena](https://community.glideapps.com/u/Deena)\
**Post date:** [August 21, 2020, 11:53pm UTC](https://community.glideapps.com/t/we-cannot-create-filters-that-are-and-as-well-as-or-correct/14369/10 "2020-08-21T23:53:48Z")

</div>

Ah, I knew I saw this somewhere. Thank you!
