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

**URL:** <https://community.glideapps.com/t/reducing-a-sheet-cell-s-value-when-a-form-is-submitted/8057>\
**Category:** Ask for Help\
**Created:** [April 29, 2020, 2:08am UTC](https://community.glideapps.com/t/reducing-a-sheet-cell-s-value-when-a-form-is-submitted/8057 "2020-04-29T02:08:21Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Corbot3000](https://avatars.discourse-cdn.com/v4/letter/c/13edae/32.png) [@Corbot3000](https://community.glideapps.com/u/Corbot3000)\
**Post date:** [April 29, 2020, 2:08am UTC](https://community.glideapps.com/t/reducing-a-sheet-cell-s-value-when-a-form-is-submitted/8057/1 "2020-04-29T02:08:21Z")

</div>

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: [akuev.glideapp.io](http://akuev.glideapp.io)

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.

---

<div class="post-metadata">

**Author:** ![Robert\_Petitto](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/robert_petitto/32/25193_2.png) [@Robert\_Petitto](https://community.glideapps.com/u/Robert_Petitto)\
**Post date:** [April 29, 2020, 2:35am UTC](https://community.glideapps.com/t/reducing-a-sheet-cell-s-value-when-a-form-is-submitted/8057/2 "2020-04-29T02:35:52Z")

</div>

Yep! I have a version of this in my Inventory app ([itemstore.glideapp.io](http://itemstore.glideapp.io)). Set a quantity for an item, then every time a user buys an item, the quantity decreases:

 ![ScreenFlow](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/2X/2/287fa32cbb89d231b4c982b714461ce506a72cb2.gif)

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.

---

<div class="post-metadata">

**Author:** ![Corbot3000](https://avatars.discourse-cdn.com/v4/letter/c/13edae/32.png) [@Corbot3000](https://community.glideapps.com/u/Corbot3000)\
**Post date:** [April 29, 2020, 3:31pm UTC](https://community.glideapps.com/t/reducing-a-sheet-cell-s-value-when-a-form-is-submitted/8057/3 "2020-04-29T15:31:42Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Robert\_Petitto](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/robert_petitto/32/25193_2.png) [@Robert\_Petitto](https://community.glideapps.com/u/Robert_Petitto)\
**Post date:** [April 29, 2020, 3:37pm UTC](https://community.glideapps.com/t/reducing-a-sheet-cell-s-value-when-a-form-is-submitted/8057/4 "2020-04-29T15:37:51Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Robert\_Petitto](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/robert_petitto/32/25193_2.png) [@Robert\_Petitto](https://community.glideapps.com/u/Robert_Petitto)\
**Post date:** [April 30, 2020, 5:00pm UTC](https://community.glideapps.com/t/reducing-a-sheet-cell-s-value-when-a-form-is-submitted/8057/5 "2020-04-30T17:00:00Z")

</div>

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

[![](https://img.youtube.com/vi/NWlEsbth7q8/hqdefault.jpg "Glide: Track Inventory of Items (Explanation)") ](https://www.youtube.com/watch?v=NWlEsbth7q8)
