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.
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.
Thankyou very much. Iām going to give this a shot.
How would you do this if a store had two managers?
The simplest way would be to create a 3rd table, call it Store Managers.
This table would just need two columns:
- Store ID: a reference to the Row ID in the Stores table
- Manager ID: a reference to the Row ID in the Managers table
The table will contain one row, per store, per manager.
So in the case where a store has two managers, there will be two rows in the Store Managers table - one row for each manager.
- To get a list of all managers for any given store, create a multi-relation from the Stores table to the Store Managers table, linking Stores->Row ID to Store Managers->Store ID
- To get a list of Stores assigned to any given manager, create a multi-relation from the Managers table to the Store Managers table, linking Managers->Row ID to Store Managers->Manager ID
Okay. that will work and streamline the app for scaling. Thankyou.
With this setup how do I use the āadd rowā action so the row that gets added remembers the store name from the previous screen. I see that there is a way to copy the store name to the clipboard. Is there an action that will allow me to paste that value also? Any other way in which I can save the store name from the previous screen. Just so its clear the workflow is as follows:
Store name tiles - Go to Supply Catalog tiles - Select Supply - Add one item by clicking on a flash button.
There are a few ways to do this, but what I would probably do is write the Store name (or Store ID) to a User Specific column as part of the navigation action.
Just a note on this.
The copy to clipboard action is for the benefit of the user, not the developer. What I mean is, itās a one way action. Itās a bit like the send webhook or send email action. Once youāve done it, the data has gone off into user land (or wherever), and thereās no way (that Iām aware of) to get it back.
Hello Darren, can you walk me through the steps on how to do this. I havenāt used user specific columns before and donāt know how to store a value using the navigation action. Thankyou very much for your time.
Hello Darren,
I am sorry for bugging you on this topic. But Iām stuck and I think it might be a simple tweak which is eluding me. Iāve figured out how to use User Specific columns and write the Store Name to this column in the data editor. But am not able to figure out how to clear out previous values from this user specific column. Here are the details of the spreadsheet setup and where I am getting stuck.
Opening screen shows different stores in tile format. Note that Manager A manages Store 1,2,3. Manager A selects Store 1 and clicks on the catalog button. This selection of the catalog button triggers a multi-step action which
Step 1 - the store name is stored in a user specific column titled Store_Active in the stores sheet and Step 2 - takes the user to the catalog of items.
Iāve created another column in the user profiles sheet which is a joint list of the Stores_Active column. When the user clicks the Add+1 button it adds a row in the Orders sheet for that specific item. The Store Name is retrieved from the Store_Aactive joined list via the set column action from the user profiles sheet. The issue is that because Manage A manages Stores 1, 2,3 the joined list shows Store 1, Store 2, store 3 for this order.
I think the solution is to not use the joint list column. If so, what column type do I use to retrieve the user specific value. Or perhaps the solution is that the multi-step action needs to first clear all values in the user-specific column before writing the Store Name through which the user clicked the catalog. But I cant figure out how to clear an entire column.
Thanks so much for your time and guidance.
More than happy to help with this, but to save time would you allow me to make a copy of your app?
If I can see it in front of me it will be much easier to visualise the challenge and come up with a solution.
You can send me a private message with the link if you want.
Ofcourse! The app can be copied from this link https://profuse-magic-8651.glideapp.io/
Thanks so much!
please try now
https://hideous-cap-4871.glideapp.io/
Iāve removed all extra sheets and features. Its just showing you the stuff related to the store and the catalog.
-Sarah