# 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:** 1\
**Showing post:** 2

<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.

---

_[View the full topic](https://community.glideapps.com/t/reducing-a-sheet-cell-s-value-when-a-form-is-submitted/8057)._
