# Interesting issues in Choice component!

**URL:** <https://community.glideapps.com/t/interesting-issues-in-choice-component/67372>\
**Category:** Ask for Help\
**Created:** [October 29, 2023, 11:53pm UTC](https://community.glideapps.com/t/interesting-issues-in-choice-component/67372 "2023-10-29T23:53:33Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Miroslav\_Madaric](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/miroslav_madaric/32/20852_2.png) [@Miroslav\_Madaric](https://community.glideapps.com/u/Miroslav_Madaric)\
**Post date:** [October 29, 2023, 11:53pm UTC](https://community.glideapps.com/t/interesting-issues-in-choice-component/67372/1 "2023-10-29T23:53:33Z")

</div>

First issue is that Choice action functions correctly only if “Write to” is the column from actual data table. If we state related table in “Write to” field, Choice displays values from related table, but doesn’t write the selected walue nowhere!?

Even worse is the behavior of Editor in the case if index for relation is not some “basic” value. If we use template, single value or anything else as a key for relation, this relation is NOT displayed in the “Write to” menue of Choice component!?

If I use Set values action in Title or Button, I can perform this funcion instead of using Choice component also with the column in related table. My problem with Button block is that the option selected is NOT accentuated and thus confuses the user!

These problems are already known or I am doing something wrong?

---

<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:** [October 30, 2023, 12:25am UTC](https://community.glideapps.com/t/interesting-issues-in-choice-component/67372/2 "2023-10-30T00:25:33Z")

</div>

I believe the “relation” choice in the choice component is built solely for Airtable’s linked records. It won’t work on any other types of database.

> [@Miroslav\_Madaric](#):
>
> My problem with Button block is that the option selected is NOT accentuated and thus confuses the user!

Can you give us a screenshot on this?

---

<div class="post-metadata">

**Author:** ![Miroslav\_Madaric](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/miroslav_madaric/32/20852_2.png) [@Miroslav\_Madaric](https://community.glideapps.com/u/Miroslav_Madaric)\
**Post date:** [October 30, 2023, 11:16am UTC](https://community.glideapps.com/t/interesting-issues-in-choice-component/67372/3 "2023-10-30T11:16:01Z")

</div>

Tnx for feedback of yours! Here is what function perfectly:

 ![set column from title](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/3/1/3148083f73f2f7d1540e3f4670391da1f4d090c1.jpeg)  
The same applies when I use Button block component instead of Title component. This is an evidence that this relation setup is correct.

My question here is whether such a workaround for storing temporary variables is really necessary or some other more elegant way of doing that exists?

Real issue concerning relationa in Choice component I will describe in next reply.

---

<div class="post-metadata">

**Author:** ![Miroslav\_Madaric](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/miroslav_madaric/32/20852_2.png) [@Miroslav\_Madaric](https://community.glideapps.com/u/Miroslav_Madaric)\
**Post date:** [October 30, 2023, 10:52pm UTC](https://community.glideapps.com/t/interesting-issues-in-choice-component/67372/4 "2023-10-30T22:52:18Z")

</div>

Here several problems with Choice component itself: first is that relation which doesn’t have key in pure text column simply doesn’t appear in the Choice component “Write to” dropdown:

 ![choice with relation](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/4/8/489f3a5e79de36a9753dd1500d09e1f358ab5f03.jpeg)  
In previous case, the key value for relation was Single value from Clipboard table (single row is always exclusively used):

 ![relation single value](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/f/8/f89b8eb508f7361da58995dde0e6e4dd831f8efc.jpeg)

Now for the sake of testing I introduced new column for relation key value, named ClipboardInd, where the Row ID as key was manually entered. This column is pure text, and the relation key value is changed to this column:

 ![relation with text key](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/8/2/82cbca12176e12369f62ede4c9b8457d5b150b81.jpeg)

Here now the Choice “write to” dropdown with the Rel Clipboard relation appearance:

 ![choice with text relation](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/6/2/62916ced59e70fa1575a426699e0d2dc7b62a01b.jpeg)

This is definitely Glide bug: Choice component “write to” dropdown doesn’t accept fully correct relation with the key value column different from Text Type!

Unfortunately, this is not the only bug in Choice component using relations: crucial is that when using relation in choice, “write to” doesn’t function! Choice is correctly displayed, but “write to” has no effect:

Btw, I found nice workaround to avoid that: simply to use my Clipboard table as the data source for the screen, instead of using table with data. In that case I can use correctly Coice component without relation and the data collections (lists) without any problem.

---

<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:** [October 30, 2023, 11:07pm UTC](https://community.glideapps.com/t/interesting-issues-in-choice-component/67372/5 "2023-10-30T23:07:22Z")

</div>

> [@Miroslav\_Madaric](#):
>
> The same applies when I use Button block component instead of Title component. This is an evidence that this relation setup is correct.

This works within an action, because that’s exactly what it’s built for. It doesn’t work with the choice component, because I think it was only built for Airtable.

> [@Miroslav\_Madaric](#):
>
> My question here is whether such a workaround for storing temporary variables is really necessary or some other more elegant way of doing that exists?

I’m not sure what you mean by “storing temporary variables” here. Can you clarify?

Regarding the choice component problem, I think as it was only intended for Airtable, it can act weird if you try it on other types of database.

---

<div class="post-metadata">

**Author:** ![Miroslav\_Madaric](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/miroslav_madaric/32/20852_2.png) [@Miroslav\_Madaric](https://community.glideapps.com/u/Miroslav_Madaric)\
**Post date:** [October 31, 2023, 8:38am UTC](https://community.glideapps.com/t/interesting-issues-in-choice-component/67372/6 "2023-10-31T08:38:39Z")

</div>

Storing temporary variables: I have the filter for retail stores based on their opening hours: W, C, A, U (works, closed, all, unknown) plus selection of location (actual or defined). This is not feasible with in app filter, so I use two diferent details lists controlled by location selection and open/closed filter.  
For both I was using Button block component, which functioned perfectly, but there was the lack of intuitivity because options in button block are static. Ok, workaround for that now I see as follows: having 4 button blocks with different accents. Anyhow, button block performs correct setting values of related clipboard filter field and further subsequent actions.

Choice component seemed to be better for user experience (accent on selected option!) , but in the setup where source for screen was table “Shops” and clipboard table izbinbrelation “write to” simply doesn’t work. So I changed the setup in a way the data source for this screen is the table “Clipboard” and no relation is needed. In that case choice component functions perfectly: fills the filter field correctly and shows selected option accentuated. Only shortcoming is that choice component doesn’t have actions, so after clicking an option there is no possibility of automated performing the action needed, eg “Go back”.

I understand the ressources constraints in Glide team and this discussion is meant only for giving ideas what should be improved.

---

<div class="post-metadata">

**Author:** ![Miroslav\_Madaric](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/miroslav_madaric/32/20852_2.png) [@Miroslav\_Madaric](https://community.glideapps.com/u/Miroslav_Madaric)\
**Post date:** [November 1, 2023, 12:17am UTC](https://community.glideapps.com/t/interesting-issues-in-choice-component/67372/7 "2023-11-01T00:17:26Z")

</div>

Now I abandoned Choice approach, because there is no actions behind. Instead I am using multiple Button blocks, where I display only the selected one with the appropriate accent. Works perfectly, easy for implementation and good user axperience, here screenshorts foir this solution:

 ![four button blocks](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/c/4/c488545a83cc2261313fdf57fd46a2d31bff1298.jpeg)
