# Filter a Table by Array instead of Single Value

**URL:** <https://community.tulip.co/t/filter-a-table-by-array-instead-of-single-value/954>\
**Category:** Support, Troubleshooting, & Help\
**Created:** [October 31, 2020, 5:30pm UTC](https://community.tulip.co/t/filter-a-table-by-array-instead-of-single-value/954 "2020-10-31T17:30:48Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Esinger5](https://avatars.discourse-cdn.com/v4/letter/e/df705f/32.png) [@Esinger5](https://community.tulip.co/u/Esinger5)\
**Post date:** [October 31, 2020, 5:30pm UTC](https://community.tulip.co/t/filter-a-table-by-array-instead-of-single-value/954/1 "2020-10-31T17:30:48Z")

</div>

Hey Gio,

Is there a way to filter an interactive table by an array rather than a single value?

Basically, I am building a training manager app and I am building a slide to assign a specific training to a user. I’d like to filter the user selection table so that it only shows users that do not have that specific training scheduled already. I built a connector that outputs an array of users that already have that specific training scheduled, but don’t know how to apply that output to a table.

For example…

I have Table 1 that generates ID’s using the expression [User Name] + [Training ID].

In Table 1, I have a field for the [User Name], [Training ID], and [Status].

I built Connector 1 that creates an array of [User Names] for the [Training ID] selected in the app that has the [Status] = “Currently Assigned”. I’ve created a text variable array named “Duplicate Training Users” which stores the Connector output.

I have Table 2 which is made up of all the Users added to this training manager app.

In the selection screen of the app, I’ve embedded Table 2, but would like to filter the table so that the [User Name] of Table 2 does not contain any of the [User Names] in the “Duplicate Training Users” text variable array.

Is there anyway to do this?

Thanks!

Eric

---

<div class="post-metadata">

**Author:** ![gio](https://sea2.discourse-cdn.com/flex020/user_avatar/community.tulip.co/gio/32/82_2.png) [@gio](https://community.tulip.co/u/gio)\
**Post date:** [November 1, 2020, 8:12am UTC](https://community.tulip.co/t/filter-a-table-by-array-instead-of-single-value/954/2 "2020-11-01T08:12:56Z")

</div>

hey @Esinger5, sounds like an awesome app you’re building!!

to answer your question, Interactive Tables cannot be filtered by an Array (the Variable type must match the Variable Column Type being used in the Filter).

have you attempted to assign the output of the connector function directly to the interactive Table, rather than using it as a filter??

if you get an Array of Objects returned from a Connector:

 ![Screen Shot 2](https://us1.discourse-cdn.com/flex020/uploads/agilemfg/original/1X/e897064a19af21cc4cbceb1b9724a29fedfc289d.jpeg)

they can be assigned directly to an interactive Table as the Datasource by selecting Variable instead of Tulip Table:

 ![Screen Shot 3](https://us1.discourse-cdn.com/flex020/uploads/agilemfg/original/1X/37dab4fcf7b55cf777ea914d055edfea05fb8060.jpeg)

does this help you build what you’re trying to?? let me know!!

gio

---

<div class="post-metadata">

**Author:** ![Esinger5](https://avatars.discourse-cdn.com/v4/letter/e/df705f/32.png) [@Esinger5](https://community.tulip.co/u/Esinger5)\
**Post date:** [November 1, 2020, 1:43pm UTC](https://community.tulip.co/t/filter-a-table-by-array-instead-of-single-value/954/3 "2020-11-01T13:43:35Z")

</div>

Hey Gio,

I’ve already explored the option you mentioned above. The issue is that I can only output users who have that training already scheduled, not the inverse.

So the hard part is basically querying two tables together using one field as a filter for the other table.

Can this be done inside of a connector?

It would be great for the connector inputs to have an array option like the outputs do or allow two table sources within one connector.

No matter how I try to think through it, I still get stuck on the issue of comparing two data sets. Depending on how I go about it, it still gives me the same issue whether it’s during the connector builds or whether it’s during my triggers or whether it’s within filtering interactive tables.

Maybe we could discuss this in a follow-up session with either you and/or Eddy.

Thanks Gio

---

<div class="post-metadata">

**Author:** ![gio](https://sea2.discourse-cdn.com/flex020/user_avatar/community.tulip.co/gio/32/82_2.png) [@gio](https://community.tulip.co/u/gio)\
**Post date:** [November 2, 2020, 2:53pm UTC](https://community.tulip.co/t/filter-a-table-by-array-instead-of-single-value/954/4 "2020-11-02T14:53:44Z")

</div>

hey @Esinger5, I think a quick call would indeed be useful to continue to understand the requirements here. I have sent you a direct message to schedule some time, speak soon!!

gio

---

<div class="post-metadata">

**Author:** ![pte](https://sea2.discourse-cdn.com/flex020/user_avatar/community.tulip.co/pte/32/444_2.png) [@pte](https://community.tulip.co/u/pte)\
**Post date:** [February 16, 2021, 12:01pm UTC](https://community.tulip.co/t/filter-a-table-by-array-instead-of-single-value/954/5 "2021-02-16T12:01:47Z")

</div>

Hello Eric and Gio  
I’m trying something really similar : An operator use a multi select widget and create a text array of id. This list of id should then be used to display an embedded table with other related fields.  
I’m a bit stuck there 😅 Did you overcome this obstacle before ? Thanks by advance 🙂

---

<div class="post-metadata">

**Author:** ![gio](https://sea2.discourse-cdn.com/flex020/user_avatar/community.tulip.co/gio/32/82_2.png) [@gio](https://community.tulip.co/u/gio)\
**Post date:** [February 16, 2021, 6:37pm UTC](https://community.tulip.co/t/filter-a-table-by-array-instead-of-single-value/954/6 "2021-02-16T18:37:30Z")

</div>

hello @pte!! assuming the list in your Multiselect is a static list, you can convert all items in the Array to Strings and use those in the filter (paying attention to make the filter `Any`).

Multiselect:

 ![Screen Shot 1](https://us1.discourse-cdn.com/flex020/uploads/agilemfg/original/2X/1/11b943af2e3ed3ef7903206d69b5abf85d2f643a.jpeg)

Array \> Strings

 ![Screen Shot 2](https://us1.discourse-cdn.com/flex020/uploads/agilemfg/original/2X/9/92e4a934219747e5bdd91c1a4e3becdc05f9d5b7.jpeg)

Filter on the Table:

 ![Screen Shot 3](https://us1.discourse-cdn.com/flex020/uploads/agilemfg/original/2X/0/07a3ff2d33a53e9b48410a1727d366b40380de58.jpeg)

resulting App:

 ![Screen Shot 4](https://us1.discourse-cdn.com/flex020/uploads/agilemfg/original/2X/6/6335543beb6d3c70c9decb20992bcec94ab88266.jpeg)

if the list is not static, you can use the Table API. let me know if this helps!!

---

<div class="post-metadata">

**Author:** ![pte](https://sea2.discourse-cdn.com/flex020/user_avatar/community.tulip.co/pte/32/444_2.png) [@pte](https://community.tulip.co/u/pte)\
**Post date:** [February 17, 2021, 8:58am UTC](https://community.tulip.co/t/filter-a-table-by-array-instead-of-single-value/954/7 "2021-02-17T08:58:37Z")

</div>

Hello Gio, yes it’s not static 😅 would be great to understand how to do it with the Table API 🙂

---

<div class="post-metadata">

**Author:** ![gio](https://sea2.discourse-cdn.com/flex020/user_avatar/community.tulip.co/gio/32/82_2.png) [@gio](https://community.tulip.co/u/gio)\
**Post date:** [February 17, 2021, 11:08am UTC](https://community.tulip.co/t/filter-a-table-by-array-instead-of-single-value/954/8 "2021-02-17T11:08:29Z")

</div>

hello @pte, OK not a problem!!

we’ll be covering Table API in this week’s Office Hours, can you make it on Friday?? if not, I can send you the recording.

also, this Support Article: [How to Use the Table API | Tulip Help Center - Support for Building Manufacturing Apps](https://support.tulip.co/en/articles/3983173-how-to-use-the-table-api) has a detailed walkthrough on how to use the Table API.
