Array Column As A Choice Input

I have several columns Hub 1, Hub 2, Hub 3 in my user profile sheet. Those columns are being combined into a single array column in the glide data editor as Hubs. I want to a choice component in a form to pull from this array column. But the choice component only allows me to pull from Hub 1, Hub 2 or Hub 3. What am I doing wrong? How can I get a choice component to allow me to show all the choices that are listed in Hub 1 through Hub 3?

can anyone help me on this one? thanks in advance for helping.

Hola @Food2Soil,

Do you want the choice component to show the 3 elements in your 3 columns? A choice component will always get info from one column.

This is been a feature request for over a year. Choice components can’t be populated from array columns. They can only be populated from relations or individual rows.

oh shucks! Why oh why!
Thanks so much for clearing this up. I’ll look at a workaround for now.

Actually, I might as well ask for help in figuring out a workaround. Here’s my use case.

I am building a backend supply order system where stores can order from a catalog of supplies.
I have one sheet for STORES, another sheet for STORE MANAGERS and a third sheet for SUPPLY ORDERS.

One individual can be in charge of several stores. So the user profile (Store Manager sheet) has columns Store 1, Store 2, Store 3 which is used to build an array column Stores. User profiles is enabled in the app and linked to the STORE MANAGER sheet so user details can be captured automatically.

To place an order for supplies, the manager goes to the store screen and selects the catalog from within the store screen. This takes them to a screen where they can use a button Add+1 to add one item to the order list. This Add+1 button is using the add row action to capture the signed in user’s information and the row id of the supply item. Its all working perfectly except for the part where I need to also capture the store for which this supply is being requested at.

Since I’m using the ‘add row’ action it needs to populate a value for the Store field. I am forced to populate using whatever value is in the Store 1 column of the user profile sheet. But the correct way to do this would be to give the user a choice from the Stores array field.

I realize that the way I’ve set this up I won’t be able to use the ‘add row’ action since there is no way to integrate a choice component in that action. Is there a way to capture the store through which the manager accessed the catalog and use that to populate the store field in the order sheet?

Is there another way you would do this? I really like the Add+1 action so don’t want to get rid of that.

Thanks so much!

You should be able to create a multiple relation column from the store array column to the stores sheet. Then, use that relation to populate the choice component.

1 Like

yeah, I’d do this a little differently. What you have doesn’t really scale, and (as you’ve already discovered) will have you jumping through hoops to make things work.

Assuming that a store will only ever have one manager at any given time, then I’d simply make “Manager” a column in your Stores table. Then you can drop those “Store 1”, “Store 2”, “Store 3” columns and just create a relation between the two tables based on user.

And your choice component becomes trivial, as you can just list the stores and filter by manager.

1 Like

Thankyou very much. I’m going to give this a shot.