Grocery Item Inventory

Can someone help me create the following glide app OR point me to a template that is close to this?

2 Tabs:
Items
Stores

Items:
Toilet Paper
Paper Towels
Milk
etc

Stores:
Store 1
Store 2
Store 3
etc

How do I create a relation so that:
1. Item Name X detail shows what store it’s available at?
2. Store X detail show what items are available at that store?
3. Allow anyone to easily mark an item available/unavailable (checkbox?)

Thanks so much in advance!

1 Like

That sounds pretty similar to the Employee directory template.

Similar, but a key difference that I can’t figure out. In the case of the Employee directory… users would need to be able to mark an “employee” (grocery item) as available or unavailable, which would change how they are shown on the office (grocery store) page.

How is this supposed to work? In what way do you want the item to show differently? When you say anybody, do you mean absolutely anybody, like employees as well as customers?

There are several ways to approach this, but it all depends on what you ultimately want. You can set filters to hide items, or use the checkbox to hide or show something on the screen to indicate the item is available or unavailable. The easiest is to first put a checkbox component on the product detail page that points to the true/false column. Then you can set all kinds of things based on that true/false value.

Thanks. I am new to glide so I’m not as familiar with this. I put in my original post how I was thinking this would work… understanding that there are probably more ways that one to achieve it. I will keep playing around…

Look like you are trying to create something similar to what we done at LOCUS.
Check locus.glideapp

If you believe this serves your purpose, you are free to use and spread the word about it

Well the easiest would be to place a checkbox on the details screen, then based on if the column set by the checkbox is true or false, set visibility to display text on the details screen that indicates if the item is available or not. Or use it to set an if then column in the data tab with some text that you can display in the details or in an inline list.

Here is where I am with the app. I’m close, but I can’t figure out how to adjust item availability per store. Or how to add ability for users to mark items on/off. Appreciate if anyone could help with this… just to get me pointed in the right direction.

xiitg.glideapp.io

Hey Stefan - looks like you’re most of the way there. However here it is for others in future.

Two tables:

1 - stores
2 - items

  • On each store you want to have a form where you can add items.

  • Each store will have it’s own Row ID

  • That form populates the items sheet along with the store’s Row ID

  • You then create a relation from stores → items which matches all the items with the store’s row id

  • Then create an inline list on each store’s details screen with the relation

  • On each item’s details screen you can create a switch that updates the availability of that item

  • You can use If → Then → Else columns to portray different icons for their status

In terms of the Uber list of all items and seeing what store’s they are in… at first glance I’m not sure… @Jeff_Hager any ideas?

Here’s a v basic draft (clone-able) https://t.co/XYX9LdHS4T?amp=1

1 Like

Thanks so much for this info @JackVaughan — The link you provided opens a responsive version and not the normal preview screen where I can copy the app. 🤷

As far as an Uber list, I would create a new sheet (uniqueitems) and use the unique formula to populate it with unique item names. Then display that list as your items tab as a list. In the data editor, create a relation column in the uniqueitems sheet that joins the item name to the item name in the items sheet. So clicking on an item will open it’s details from the uniqueitems sheet. Here you can place an online list that uses the relation to show an expanded list of items in each store. This could be further refined, but it’s a starting point.

Looks like Jack created his app in staging, which uses the full screen feature. The full screen feature doesn’t currently give access to the copy button. You probably wouldn’t want a staying copy. His app is really pretty simple and I think his step by step instructions are pretty good and straight forward.

1 Like

Oh dear… sorry. I was working in our staging environment. Let me make it again! Gimme a sec

1 Like

@Stefan_Poulos1 here you go: qlyos.glideapp.io

@Jeff_Hager this is flummoxing me… :wink:I’m not following your description there. If you have time - let me know what I’ve done wrong. Or copy & show me. As always - thanks.

1 Like

Copying must be turned off. It seems to turn itself off once in awhile, I think when publishing.

Ok sorry try now.

1 Like

Here’s my version. I removed the 4th relations sheet. The key here is a template column on the stores sheet that contains the rowID and the word “true”. There is also a template column on the items sheet that contains the store RowID and the availability value. The unique items sheet has a relation to Items. Then a lookup pulls back the template with the store rowid and availability. Then a relation is created to the template column in the stores sheet.

Ultimately, when you click on an item, it will provide a list of stores that contain that item, but if the template column from the item sheet contains false, then it will never find a matching store record, because the store sheet only has True in it’s template column. I know it’s confusing, but it’s best to just study and step through each column of the Unique Items sheet.

1cc1u.glideapp.io

2 Likes

Sorry this turned into something more complicated! I appreciate your time helping me. I thought it would be a quick little thing for me to help communities. :grimacing: Just for context… I am in these FB groups that post images like this and I thought THERE HAS TO BE A BETTER WAY…

91117962_10156947019745840_4021917554770444288_n

2 Likes

Awesome @Jeff_Hager thanks.

@Mark just helped me on a version as well (have updated original template I shared above). Although @Stefan_Poulos1 I wouldn’t say this is a simple template! :wink:

This is definitely a great case study. The use case makes total sense and yet it’s not straightforward to do in Glide.

Anyway - when I do the short video on how it works I’ll share here.

2 Likes

@JackVaughan This would be a good argument for allowing If Then compares within a relation column. Basically like A SQL Where clause, or a “Left Join On”.

Or maybe a different type of relation column that’s just a straight link to a different sheet, but where you can then compare multiple values from the first sheet to multiple values in the second sheet. And maybe compare values in the second sheet to static values as well.

A little more advanced, but as a programmer I can dream, right? :wink:

1 Like

YES. I know you and I have referenced this functionality several time…would provide a solution for many apps looking to do something similar.

2 Likes