Ordering with budget

hello, i was wondering if someone could help with this that i’m trying to work on (with tables etc):

  • An ordering system where all staff have a budget of £150 every 6 weeks, then it resets
  • they do not use their own money so in a way its like a virtual currency (but not crypto)
  • each item has a price and when they ‘order’ an item an email gets sent to someone else to order the item.
  • when their budget gets too slow items above that, they cannot order.

If someone can help me with this please reply

Hello Kyem, welcome to Glide’s community forum.

Ordering and e-commerce style apps have been built on Glide, though really Glide shines for B2B internal business apps, the ones that help address internal business processes.

All of you bullet points look like they can be built on Glide.

To get start, you can check out:

Welcome to Glide!

i think what i could need help with is tables and math collums etc to get this to work, ive tried chatgpt but that hasnt been working

Have you checked ou the template gallery? You might find templates to help you get started.

yes i have, i cant find exactly what i want, i dont think itll be that hard to do as its just math columns and a few permissions with linking users/products, but i just need assistance

Hello @kyem :slight_smile:

It’s always tricky to give advice on the data model. That said, your bulleted list paves the way for a structure containing the following tables:


Users
A table where you’ll store data about users like name, email, id. It’s also be useful to calculate Purchased amount during the current period thanks to a Query column prior to a Rollup one. From that, you’ll be able to get the Available amount thanks to a Math column (150 - Available amount).
This way, you’ll have the ability to place an order only if Item price (see below) is less or equal to Available amount.

Items
All data related to products: Item name, Item description, Item ID, Item price and even stock (but that’s another topic if you want to deal with the inventory part). You could also obtains information such as Last order date or Quantities sold using - again - Query, Rollup, Lookup and/or Single Value column types.

Purchases
For each order placed, you will add a row containing Row ID (automaticly created), User ID, Item ID, Order Date, Total amount. Depending on the level of detail you expect, it might also be clever to store Quantity and Unit price separatly to calculate, after that, the Total amount (Math column → Quantity * Unit price). For example, if the unit price changes over time…
As you pointed out, these different ID’s will let you create Relation columns easily :wink:


Some additional thoughs
The main difficulty in my opinion is how you will define the concept of reseting the budget every 6 weeks:

  • is it a rolling 6-week cycle?
  • does it start again at a specific time (for example, the first day of each quarter)?
  • is it linked to a date available in a column (in User table probably)?

Nothing impossible in Glide, just a few ajustments to apply once it’s validated.


Hope this helps!

1 Like

I would use a human-friendly cycle ID for the reset. Say C001 is the first cycle, you store it in a helper table as a basic column, and every 6 weeks, say at midnight Monday, you change it to C002, C003 and so on.

The relation/query in the Users table would look at only expenses having the same cycle ID as the current cycle, and calculate the amount of currency left that they can use.

hello, thank you - i will try this out soon and let you know if it works, yes it is a rolling 6 week cycle, just every 6 weeks non stop, thank you