Inventory of products per event

Hi,
I’m quite new to Glide and apps. I have two tables: events and products.
Per event, we need to count the number of products before and after.

What do I need to do to make this work? For each event, the two numbers need per product need to be stored somehow. And I’ve been trying getting my head around the logic behind this, but the right solution hasn’t yet come to my mind… :wink:

Thank you very much!

All best,
Luka

What is it that causes the number of products to change, and how do you record that?

It’s our stock. We count it manually before an event and afterwards. They are entered manually on an event edit screen.
I now had an idea by creating a new table and an action that creates a new row whenever an event is created. There I would create two columns for each product (as the products very rarely change). That’s not efficient/intelligent, but it was a quick idea/workaround.

If wanted something a little more elegant and more scalable, what you could do is create a 3rd table, lets call it a Product Movement table.

The idea is that every time a product item is added or removed, it gets recorded in that table. You could have the following columns:

  • Date/time: when an item is added or removed
  • ProductID: unique product identifier, that links to the Products table
  • Quantity: how many
  • EventID: if associated with a specific event, an ID that links the movement to that event

You could then calculate pretty much anything you need with queries, relations and roll ups.

2 Likes

I just finished an assets management app for events. We add every asset unit as a row. Makes app way simpler although takes a lot more rows. We have asset tracking enabled so we need to know the exact location of every asset within an event and hence need each unit in a row.

However on another app, I had the same problem as you do. We had a 3rd helper table for movement, just as Darren explained above but we only used for products that were shared between multiple events or in our case stores …

2 Likes

Thank you both! I did create a 3rd table called “Stock”, where all counted products will get registered with event ID, product ID, date, number before, number after and the calculated difference.

Now I just need to get a list of those products to export them as CSV. :slight_smile: I have that stock table, but it contains products numbers for all events.
I bet, this is child’s play for experienced Glide developers. But I struggle getting filtered data out of the Stock list to export it as CSV.

Thank you!

Here is an example of the “Stock” table. I basically need the user to be able to export all entries for one specific event ID by one click.

Indeed it is. It’s even child’s play for anyone, once you know how to do it :wink:

  • In your Events table, create a multiple relation column that matches the EventID with the same value in the Stock table.
  • You can then use that relation as the source with the CSV Export integration.

If you need additional filters on the data, you can use a Query column instead of a relation.

Thanks you!
I thought so, too. But I still struggle as a beginner :sweat_smile:

I get your explanation, but I’d need to export the information like this:

Is there a way I can rearrange it like on the screenshot, so it exports all the rows with the same value in one field including selected columns from the “Stock” table?

Cause in the events table, I did create a query now that includes all products for that event and I used lookup on that query to get the numbers. But now all I have are querys inside one field. How can I export that as a structured list with the corresponding numbers next to them?

ah, I see. You want a summary per Product, right?

Okay, you’ll need to approach that slightly differently. Here is my suggestion:

  • Firstly, I’ll assume that you will want to view and export this from the context of an Event details screen.
  • Start by creating a user specific column in your User Profiles table to hold an EventID
  • Then from the screen where you view a collection of Events, change the action that is used to view a specific Event as follows:
    – Set Column Values → User Profile Row → EventID column, setting it to the selected EventID
    – Show Details Screen → This item
  • Now in your Products table, create a Query column that targets your Stock table, and apply the following filters:
    – EventID is User Profile → Event ID
    – ProductID is This row → ProductID
  • Now you can do rollups through that query, and it should give you discrete counts, etc per Product.
  • Then to create your CSV Export, add a query column to your Events table that targets your Products table, filter it where the above query is not empty, and use that as the source of the export.

Untested, but I’m pretty sure that should do it for you.

3 Likes

Really appreciate your help!! Thank you!

Well, I have events, and per event there are specific products that are used (not always the same, and not always all). Per event, the numbers “Vorher (=before)” “Nachher (=afterwards)” and “Differenz (=difference between those two numbers)” are different. The products are counted before and after each event, and the difference is the number, the client has to pay. We will enter it later on in the accountancy software.

But our employees should be able to count it via the app (this works). For each event, the products are saved with the values before, after and the calculated difference inside the “Stock” table.
Then they should be able to send the list with the products of that event including the numbers (maybe as a simple table or csv data) via mail/as file to our accountant. That’s why I need a list of all products used at a specific event including the three values for that product for that event.

Sounds complicated, I know :sweat_smile:

Yes, the solution that I outlined above should get that for you.

Ok, I’ll dig deeper into it. Maybe the logic behind it needs to sink into my brain first :wink:
Thanks!

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.