Approach for storing and using a global value for multiple users

I am building an app for a food bank and they have the following need:

Each week they receive x items of food from various categories. the app decrements the counts when items are given to clients. each client normally receives 1 of each item.

The need is to be able to change the number of items that can be provided in a given category each week. For example - if we have a surplus of “Hygiene” items clients can recieve 2 items for that week.

I have different users actually providing items to clients so I need a way for

  1. admin to specify how many items in each category are available to clients that week.
  2. a way to display this value to different users for each category. if the count is greater than 1 then my choice component needs to become a multiple selection component

I have a synced google sheet for each category - so my initial plan is to have the admin specify a weekly item count for each category in the users table then somehow propagate that value into a column in each of my 6 item category tabs on the synced google sheet.

I found several posts about “global” values for glide that can be accessed by any user but no resolution. I wish Glide supported a way to access a global variable that is not tied to a user profile since the users giving the food out can’t read the user profile data in the admin row.

Thanks for any help.

Any value from the user’s row in the user table is globally available. To fill a value in all user rows, you can use either a Single Value column, a Relation/Lookup, or a Query/Single Value. If you get that value in all user rows, then it’s available globally to all users.

Alternatively, you could use the same methods above in any other tables where you would need to use those values in screens related to those tables.

2 Likes

Do you mean you have 6 sheets, one for each category?

Yes. There are 6 tabs in the Google sheet. The client needed it this way. So in have 6 sheets in glide all with the same columns