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?
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.
Can you give us a screenshot on this?
Tnx for feedback of yours! Here is what function perfectly:
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.
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:
In previous case, the key value for relation was Single value from Clipboard table (single row is always exclusively used):
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:
Here now the Choice “write to” dropdown with the Rel Clipboard relation appearance:
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.
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.
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.
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.
1 Like
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: