# Choice component + filter = strange behavior

**URL:** <https://community.glideapps.com/t/choice-component-filter-strange-behavior/60368>\
**Category:** Ask for Help\
**Created:** [April 10, 2023, 5:45pm UTC](https://community.glideapps.com/t/choice-component-filter-strange-behavior/60368 "2023-04-10T17:45:07Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![Bruno\_Chazel](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/bruno_chazel/32/55593_2.png) [@Bruno\_Chazel](https://community.glideapps.com/u/Bruno_Chazel)\
**Post date:** [April 10, 2023, 5:45pm UTC](https://community.glideapps.com/t/choice-component-filter-strange-behavior/60368/1 "2023-04-10T17:45:07Z")

</div>

Hello,

I have a problem that looks like a bug with the “choice” component and the “filters”.

My use case is simple: I have a child profile table “Kids” and a table “catalog” of illustrated cards. I what to associate some cards to children profiles as rewards. The “choice” component allows me to enter the row id of a child profile in a column of the table “catalog”. There is a relationship column in the child table that checks if its name is associated with a card, this allows the displayed cards that the child collects to be shown in its own screen and it works well.

However, when I want to add filters to the “choice” component, ie a “number of gold pieces greater than or equal to 20” and “collection column” in the child table does not contain the name of the card", the behavior changes: each choice becomes unique and erases the previous one, even if “allow selecting multiple” is selected."

I really do not understand why filters would be wrong, but even, they seems to change the way the choice is made, from “multiple” to “only one”?

 ![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/9/5/953cba03cb87eaf3088a12a603c8a05e1713f815.jpeg)

---

<div class="post-metadata">

**Author:** ![Lucas\_Malguy1](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/lucas_malguy1/32/54607_2.png) [@Lucas\_Malguy1](https://community.glideapps.com/u/Lucas_Malguy1)\
**Post date:** [April 10, 2023, 8:10pm UTC](https://community.glideapps.com/t/choice-component-filter-strange-behavior/60368/2 "2023-04-10T20:10:48Z")

</div>

Hi @Bruno_Chazel

> The “choice” component allows me to enter the row id of a child profile in a column of the table “catalog”.

Does a card can be associated to multiples kids?  
What it the type of the columns you use for the filters? Especially the collection columns? If it’s only text (“card1,card2”) you have to split it and use this split columns. I think it would work if the issue comes from this of course.

---

<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:** [April 11, 2023, 12:30am UTC](https://community.glideapps.com/t/choice-component-filter-strange-behavior/60368/3 "2023-04-11T00:30:05Z")

</div>

Can you include some screenshots of how you’re setting the filter up, and sample data on the backend? Thank you.

---

<div class="post-metadata">

**Author:** ![Bruno\_Chazel](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/bruno_chazel/32/55593_2.png) [@Bruno\_Chazel](https://community.glideapps.com/u/Bruno_Chazel)\
**Post date:** [April 11, 2023, 6:59am UTC](https://community.glideapps.com/t/choice-component-filter-strange-behavior/60368/4 "2023-04-11T06:59:46Z")

</div>

Many thanks,

Here is a screenshot of the card table :

 ![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/2/4/24ddf540fca2afdbaf5e0c83842619fb63e303e8.jpeg)

The choice component writes into the “quel enfant row ID” which is a text column.

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

Below the child profiles table :

 ![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/7/8/78f7b7850f527b3214d4d151f493e508ab1a736e.png)

The relation colunm is linked to “compile propriétaire” that separates the “quel enfant row ID” into independent elements.

 ![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/7/1/71b9ed7dff4640b9f0fec5664c41bf39f28f3cb4.png)

and the filters :

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

When I add the second filter to hide child that already own the card … it doesn’t work anymore.

@Lucas_Malguy1 : yes, 1 card can have multiple kids owners.

---

<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:** [April 11, 2023, 7:08am UTC](https://community.glideapps.com/t/choice-component-filter-strange-behavior/60368/5 "2023-04-11T07:08:21Z")

</div>

> [@Bruno\_Chazel](#):
>
> When I add the second filter to hide child that already own the card … it doesn’t work anymore.

Yes, I can see why. It’s because the column you are trying to filter on is a Lookup that’s returning an array. “Does not contain” only works with strings, not arrays. What you could do is add a Joined List column that targets your Lookup column, and then use that Joined List column in your filter condition.

---

<div class="post-metadata">

**Author:** ![Bruno\_Chazel](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/bruno_chazel/32/55593_2.png) [@Bruno\_Chazel](https://community.glideapps.com/u/Bruno_Chazel)\
**Post date:** [April 11, 2023, 9:09am UTC](https://community.glideapps.com/t/choice-component-filter-strange-behavior/60368/6 "2023-04-11T09:09:06Z")

</div>

Many thanks for the reply,

The join list into the cards table looks like this : (so it doesn’t work ☹ )… ?)

 ![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/7/2/726a518eab1e9c18b66a092509f0d92139ac5e4d.jpeg)

I tried this filter :

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

that (I understand ?) means : there isn’t the name of the card into the join list column into the child table.q

not working.

I tried the same filter using the text column where choice writes : “quel enfant row id…” : not working

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

I wanted to try same filter using a split column of 'quel enfant row id", but It doesn’t appear as a selection :

 ![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/3/7/3780d8ad0221bd5fe51953e32e65b7b8f56570c7.jpeg)

I tried this one :

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

not working.

I have no more ideas … 🤔

---

<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:** [April 11, 2023, 9:24am UTC](https://community.glideapps.com/t/choice-component-filter-strange-behavior/60368/7 "2023-04-11T09:24:52Z")

</div>

If you’re wanting to filter by name, you should have a joined list of Names rather than RowIDs.

---

<div class="post-metadata">

**Author:** ![Bruno\_Chazel](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/bruno_chazel/32/55593_2.png) [@Bruno\_Chazel](https://community.glideapps.com/u/Bruno_Chazel)\
**Post date:** [April 11, 2023, 12:23pm UTC](https://community.glideapps.com/t/choice-component-filter-strange-behavior/60368/8 "2023-04-11T12:23:24Z")

</div>

Thanks @Darren_Murphy

I am obviously missing something.

I created a simpler version of my use case.

I want to filter the names displayed by the choice component based on the the fact that they -are/are not- already owners of this specific thing.

Couldn’t make it worked, argh it is probably so simple 😭 😆 !

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

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

 ![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/3/9/397c33b56628c0cc09c35e150b1de14688650f16.jpeg)

---

<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:** [April 11, 2023, 1:24pm UTC](https://community.glideapps.com/t/choice-component-filter-strange-behavior/60368/9 "2023-04-11T13:24:16Z")

</div>

> [@Bruno\_Chazel](#):
>
> I want to filter the names displayed by the choice component based on the the fact that they -are/are not- already owners of this specific thing.

So you only want to show names that are not already associated with the Thing in question?  
If so, the filter on your choice component should be “relation to things is empty”.

---

<div class="post-metadata">

**Author:** ![Bruno\_Chazel](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/bruno_chazel/32/55593_2.png) [@Bruno\_Chazel](https://community.glideapps.com/u/Bruno_Chazel)\
**Post date:** [April 11, 2023, 1:43pm UTC](https://community.glideapps.com/t/choice-component-filter-strange-behavior/60368/10 "2023-04-11T13:43:17Z")

</div>

In my understanding it doesn’t do what I want : “relation to things” will not be empty as soon as a child got 1 thing, whatever it is :

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

I want to hide the child because _he already owns this specific thing_, as he will have already collected other things.

In this example, once user click on the “Rombi” item, the choice component should only show “Julien” because “Paul” and “Marie” own already “Rombi”. It seems easy, but couldn’t find the filter that do the trick !

---

<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:** [April 11, 2023, 1:54pm UTC](https://community.glideapps.com/t/choice-component-filter-strange-behavior/60368/11 "2023-04-11T13:54:38Z")

</div>

Yes, sorry - you’re correct.

Let’s just take a step back. Tell me, are you trying to do something like the following?

---

<div class="post-metadata">

**Author:** ![Lucas\_Malguy1](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/lucas_malguy1/32/54607_2.png) [@Lucas\_Malguy1](https://community.glideapps.com/u/Lucas_Malguy1)\
**Post date:** [April 11, 2023, 1:55pm UTC](https://community.glideapps.com/t/choice-component-filter-strange-behavior/60368/12 "2023-04-11T13:55:30Z")

</div>

What if you try something like that:

 ![Capture d’écran 2023-04-11 à 15.51.03](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/4/c/4cc8f3d73d9743a36f558a8c40c5f3cc2ee19dd1.png)  
 ![Capture d’écran 2023-04-11 à 15.51.12](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/5/7/57ea5535aee4a50dc057f2c7dd63e994de7e766a.png)  
Uploading: Capture d’écran 2023-04-11 à 15.51.16.png…

I didn’t catch the user experience so maybe it won’t fit your needs, but let us know.  
Anyway, I think you would need to add other columns to deal with the ownership thing.

EDIT: I see than @Darren_Murphy was faster!

---

<div class="post-metadata">

**Author:** ![Bruno\_Chazel](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/bruno_chazel/32/55593_2.png) [@Bruno\_Chazel](https://community.glideapps.com/u/Bruno_Chazel)\
**Post date:** [April 11, 2023, 2:49pm UTC](https://community.glideapps.com/t/choice-component-filter-strange-behavior/60368/13 "2023-04-11T14:49:30Z")

</div>

@Darren_Murphy

Yes, I am trying to do something similar, _but_ the user ID is the same : user is one parent that may have multiple children. And I want that these children can collect some illustrated cards.

The way I found was this screen with a choice component that write the name (or row id) of the child into the table of cards, so child can have their own separate collection. (I wanted to do that directly from each child 's screen, where a child could just touch a button like “buy this card” to collect the item, but I didn’t success to find a proper for now).

@Lucas_Malguy1  
I tried that but it doesn’t work 😪

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

---

<div class="post-metadata">

**Author:** ![Lucas\_Malguy1](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/lucas_malguy1/32/54607_2.png) [@Lucas\_Malguy1](https://community.glideapps.com/u/Lucas_Malguy1)\
**Post date:** [April 11, 2023, 4:34pm UTC](https://community.glideapps.com/t/choice-component-filter-strange-behavior/60368/14 "2023-04-11T16:34:16Z")

</div>

This is weird 🤔

Let’s recap to see if didn’t miss something.

- On the app, a user is on the cards list, open one and is directed into the card’s details page.
- When he clicks on a name (to make it owner) the selected name is added into the card’s owner on the cards table.
- In the User tab, there is a relation between the User name AND the card owner’s name in the cards tab (split owner’s name)
- You then retrieve the names of the name with a lookup in the owned card.

Is that right? 👀  
Your choice component has as a data source the users tab right?

If yes my example should work since it’s this exact workflow (or i’m going crazy)  
If not I’ll do a screen recording 😉

---

<div class="post-metadata">

**Author:** ![Bruno\_Chazel](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/bruno_chazel/32/55593_2.png) [@Bruno\_Chazel](https://community.glideapps.com/u/Bruno_Chazel)\
**Post date:** [April 11, 2023, 5:11pm UTC](https://community.glideapps.com/t/choice-component-filter-strange-behavior/60368/15 "2023-04-11T17:11:50Z")

</div>

- On the app, a user is on the cards list, open one and is directed into the card’s details page

- When he clicks on a name (to make it owner) the selected name is added into the card’s owner on the cards table.

Yes. In my simple use case, user is on the “things” list, touch 1 item, that open the page (slide in) with the choice component. the choice component shows the child and write the chosen name into the column “choice component” of the things table. (and it works, but without using the filter).

 ![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/e/c/ec03ac5d88cf2396362706a225ff9440df2c940c.jpeg)

- In the User tab, there is a relation between the User name AND the card owner’s name in the cards tab (split owner’s name)
- You then retrieve the names of the name with a lookup in the owned card.  
Is that right? 👀  
Your choice component has as a data source the users tab right?  
If yes my example should work since it’s this exact workflow (or i’m going crazy)

It is not into the user tab, it is into another table “children” :

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

I’ve made also made several columns into the “things” table to get the information owner/owned in both table, hoping I could use one of them to a find a way to filter :

 ![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/5/7/57f46b40d539c0daf45310e2a603fa4e4076b9c4.jpeg)

If not I’ll do a screen recording 😉

I would love to see a screen recording, because for now it is not working (and yes I am going crazy as it seems to me like at least 3 filters I tried should work… 😆)

---

<div class="post-metadata">

**Author:** ![Lucas\_Malguy1](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/lucas_malguy1/32/54607_2.png) [@Lucas\_Malguy1](https://community.glideapps.com/u/Lucas_Malguy1)\
**Post date:** [April 12, 2023, 4:25pm UTC](https://community.glideapps.com/t/choice-component-filter-strange-behavior/60368/16 "2023-04-12T16:25:45Z")

</div>

Hi @Bruno_Chazel

Here is a screen [video](https://drive.google.com/file/d/1ATI7nM4RmsjPtvVxzvzcn_KYdILQ1xTI/view?usp=share_link), let me know if this not what you want to do or if you have some questions 😉

---

<div class="post-metadata">

**Author:** ![Bruno\_Chazel](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/bruno_chazel/32/55593_2.png) [@Bruno\_Chazel](https://community.glideapps.com/u/Bruno_Chazel)\
**Post date:** [April 12, 2023, 5:03pm UTC](https://community.glideapps.com/t/choice-component-filter-strange-behavior/60368/17 "2023-04-12T17:03:59Z")

</div>

wooo, looks good !!! 😄

and the validate / cancel buttons are great too !

many thanks @Lucas_Malguy1 , I am too tired right now to reproduce your app, but I will soon !

many thanks again, and i’ll let you know when I will success to do it ! 🫰

---

<div class="post-metadata">

**Author:** ![Bruno\_Chazel](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/bruno_chazel/32/55593_2.png) [@Bruno\_Chazel](https://community.glideapps.com/u/Bruno_Chazel)\
**Post date:** [April 12, 2023, 8:33pm UTC](https://community.glideapps.com/t/choice-component-filter-strange-behavior/60368/18 "2023-04-12T20:33:40Z")

</div>

Hi @Lucas_Malguy1,

I am almost there !

For 1 minute it worked, then … not so much. It worked only for 1 item 😭

I’ve made a video to show you what happens :

> **[filter and choice component trouble.mp4](https://drive.google.com/file/d/1xEiDh9h4XpJiDWo6EI7nxpGbYq-yi3LV/view?usp=share_link)**
>
> Google Drive file.

---

<div class="post-metadata">

**Author:** ![Lucas\_Malguy1](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/lucas_malguy1/32/54607_2.png) [@Lucas\_Malguy1](https://community.glideapps.com/u/Lucas_Malguy1)\
**Post date:** [April 13, 2023, 7:08am UTC](https://community.glideapps.com/t/choice-component-filter-strange-behavior/60368/19 "2023-04-13T07:08:36Z")

</div>

Hi @Bruno_Chazel

Good news ! Glad that it’s working!

In your kids table, is your “rel with split already owner” match multiple? If not, the data in your lookup will be a text, which is why then in your choice component filter you don’t have the “doesn’t contain”.

Once match multiple selected, reconnect your lookup 🙂

 ![Capture d’écran 2023-04-13 à 09.06.46](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/6/1/61877ec6bdcd3a80a38bafe2578df4c8ec75ce9f.png)

---

<div class="post-metadata">

**Author:** ![Bruno\_Chazel](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/bruno_chazel/32/55593_2.png) [@Bruno\_Chazel](https://community.glideapps.com/u/Bruno_Chazel)\
**Post date:** [April 13, 2023, 9:52am UTC](https://community.glideapps.com/t/choice-component-filter-strange-behavior/60368/20 "2023-04-13T09:52:42Z")

</div>

Hi @Lucas_Malguy1

Merci beaucoup, it worked perfectly ! 👌

That was actually much more tricky than I thought - I am a newbie on glide, so I really couldn’t find the solution without you.

Encore merci for your help,

have a great day !

[Next page](https://community.glideapps.com/t/choice-component-filter-strange-behavior/60368.md?page=2)
