# Can't use "includes" when referencing array column

**URL:** <https://community.glideapps.com/t/cant-use-includes-when-referencing-array-column/27201>\
**Category:** Report a Bug\
**Created:** [May 25, 2021, 11:09am UTC](https://community.glideapps.com/t/cant-use-includes-when-referencing-array-column/27201 "2021-05-25T11:09:29Z")\
**Posts on this page:** 14\
**Page:** 1

<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:** [May 25, 2021, 11:09am UTC](https://community.glideapps.com/t/cant-use-includes-when-referencing-array-column/27201/1 "2021-05-25T11:09:29Z")

</div>

Creating this as a bug, but maybe it’s a feature request… (or maybe I just haven’t figured it out)

I have a Private Pro app, and I’m using [Roles](https://docs.glideapps.com/all/reference/security-and-per-user-data/user-profiles/roles), which is configured as an array column.

So in my User Profiles table, I have something that looks like this:

| Name | Email | Role 1 | Role 2 | Role 3 |
| --- | --- | --- | --- | --- |
| Fred | [fred@example.com](mailto:fred@example.com) | Admin | Manager | User |
| Joe | [joe@example.com](mailto:joe@example.com) | Manager | User | |
| Mary | [mary@example.com](mailto:mary@example.com) | User | | |

Now, I want to use my Roles to control tab visibility, and (for example) I have a Tab that I want only to be visible to Managers.

What I would expect to be able to do is create a visibility condition as follows:

- `where Role includes Manager` (ie. address the array column directly)

But I can’t - because the only options available with an array column are `is empty` or `is not empty`.  
So I’m forced to address each column in the array individually and do:

- `where Role 1 is Manager or Role 2 is Manager or Role 3 is Manager`

UGH! 😖

I’m hoping that I’ve missed something - have I? 🤔 🙏

---

<div class="post-metadata">

**Author:** ![adriasoce](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/adriasoce/32/24153_2.png) [@adriasoce](https://community.glideapps.com/u/adriasoce)\
**Post date:** [May 25, 2021, 11:49am UTC](https://community.glideapps.com/t/cant-use-includes-when-referencing-array-column/27201/2 "2021-05-25T11:49:48Z")

</div>

Have you tried to create a joined column and then split them to achieve the is included? I know that its not the optimal way but should work

---

<div class="post-metadata">

**Author:** ![ThinhDinh](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/thinhdinh/32/49_2.png) [@ThinhDinh](https://community.glideapps.com/u/ThinhDinh)\
**Post date:** [May 25, 2021, 12:05pm UTC](https://community.glideapps.com/t/cant-use-includes-when-referencing-array-column/27201/3 "2021-05-25T12:05:35Z")

</div>

Or a template column, since this is probably just multiple columns on the same row.

---

<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:** [May 25, 2021, 12:11pm UTC](https://community.glideapps.com/t/cant-use-includes-when-referencing-array-column/27201/4 "2021-05-25T12:11:05Z")

</div>

No, that doesn’t work.  
I think there is a general problem here, where you can’t use includes when referencing an array column…

 ![Screen Shot 2021-05-25 at 8.10.24 PM](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/0/6/061472effffed945f7ed9725a63fe9a26d29c1c1.jpeg)

Same thing if I try to reference the Role (array) column directly:

 ![Screen Shot 2021-05-25 at 8.17.19 PM](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/5/d/5d990095a913e1c161893c4fcdec780a8864fd41.png)

It seems that Glide is treating an array column as a relation in this context, which just seems intuitively wrong, no?

(I’ve updated my original topic description)

---

<div class="post-metadata">

**Author:** ![ThinhDinh](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/thinhdinh/32/49_2.png) [@ThinhDinh](https://community.glideapps.com/u/ThinhDinh)\
**Post date:** [May 25, 2021, 2:44pm UTC](https://community.glideapps.com/t/cant-use-includes-when-referencing-array-column/27201/5 "2021-05-25T14:44:09Z")

</div>

Yeah you are correct on the points regarding the array, only a template column would help in this scenario I believe.

---

<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:** [May 25, 2021, 2:49pm UTC](https://community.glideapps.com/t/cant-use-includes-when-referencing-array-column/27201/6 "2021-05-25T14:49:31Z")

</div>

How?

---

<div class="post-metadata">

**Author:** ![ThinhDinh](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/thinhdinh/32/49_2.png) [@ThinhDinh](https://community.glideapps.com/u/ThinhDinh)\
**Post date:** [May 25, 2021, 3:00pm UTC](https://community.glideapps.com/t/cant-use-includes-when-referencing-array-column/27201/7 "2021-05-25T15:00:56Z")

</div>

A template column like “R1-R2-R3” then replace by your 3 roles columns, use include accordingly. Would it work?

---

<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:** [May 25, 2021, 3:07pm UTC](https://community.glideapps.com/t/cant-use-includes-when-referencing-array-column/27201/8 "2021-05-25T15:07:19Z")

</div>

oh, I see what you mean.  
Yeah, looks like that works. Seems like a horrible kludge, though.

---

<div class="post-metadata">

**Author:** ![david](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/david/32/62831_2.png) [@david](https://community.glideapps.com/u/david)\
**Post date:** [May 25, 2021, 3:14pm UTC](https://community.glideapps.com/t/cant-use-includes-when-referencing-array-column/27201/9 "2021-05-25T15:14:05Z")

</div>

Yes, we need to add `includes` as a predicate on array types!

---

<div class="post-metadata">

**Author:** ![adriasoce](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/adriasoce/32/24153_2.png) [@adriasoce](https://community.glideapps.com/u/adriasoce)\
**Post date:** [May 25, 2021, 6:36pm UTC](https://community.glideapps.com/t/cant-use-includes-when-referencing-array-column/27201/10 "2021-05-25T18:36:50Z")

</div>

Please! Cenrtantly the solution the template column is cool for the moment but would be okey to have an include in arrays

---

<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:** [November 18, 2021, 11:09pm UTC](https://community.glideapps.com/t/cant-use-includes-when-referencing-array-column/27201/11 "2021-11-18T23:09:01Z")

</div>

Closing due to inactivity. This topic will be deleted in a few weeks if there are no more comments.

---

<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:** [November 18, 2021, 11:09pm UTC](https://community.glideapps.com/t/cant-use-includes-when-referencing-array-column/27201/12 "2021-11-18T23:09:01Z")

</div>



---

<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:** [December 19, 2021, 10:28pm UTC](https://community.glideapps.com/t/cant-use-includes-when-referencing-array-column/27201/13 "2021-12-19T22:28:38Z")

</div>



---

<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:** [December 19, 2021, 10:28pm UTC](https://community.glideapps.com/t/cant-use-includes-when-referencing-array-column/27201/14 "2021-12-19T22:28:38Z")

</div>


