Reducing a sheet cell’s value when a form is submitted

I am a university student working on a finals project to create a Glide app for a local non-profit cooperative. I am attempting to create a Glide app that can let buyers view the flowers that florists enter as inventory within the app, and when the buyer selects a flower to purchase, the quantity needs to be reduced. I would also like to somehow mark an order as “fulfilled” when a form is also submitted from within the Current Orders section.

My web app is available publicly and can be copied and shared here:

When a buyer goes to Flowers Available, selects a flower, and clicks “order” and enters the quantity to purchase, I need the quantity to purchase to reduce the value of the quantity thats in “current inventory”. Is there some sort of excel formula or glide relation that can help me do this?

I would also like the ability for items in “Current Orders” to be able to click a button and have that specific item be “fulfilled”, and be removed from the “Current Orders” area of the Glide app. Is this at all possible?

I appreciate all your help.

Yep! I have a version of this in my Inventory app ( Set a quantity for an item, then every time a user buys an item, the quantity decreases:

Basically, set an initial quantity in the shop tab. Do a multiple relation to the SKU between shop tab and purchases tab. Rollup the count of purchases within the relation. Subtract the count from the quantity using a math column. Display the result. Hide the buy button once the inventory reaches zero.

Thats awesome! Do you think there would be an easy way to automatically assign a random SKU to a form that a user inputs? This would go far in ensuring that growers don’t have to enter in any other data.

Yes. You can use the special value > Unique ID option to automatically “submit” a UUID per transaction.

Here’s the explanatory video for anyone who wants to be able to track manage/track inventory in Glide.