# How to do counter increase n decrease

**URL:** <https://community.glideapps.com/t/how-to-do-counter-increase-n-decrease/44163>\
**Category:** Ask for Help\
**Created:** [July 9, 2022, 7:58am UTC](https://community.glideapps.com/t/how-to-do-counter-increase-n-decrease/44163 "2022-07-09T07:58:47Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Manikandan\_R](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/manikandan_r/32/43482_2.png) [@Manikandan\_R](https://community.glideapps.com/u/Manikandan_R)\
**Post date:** [July 9, 2022, 7:58am UTC](https://community.glideapps.com/t/how-to-do-counter-increase-n-decrease/44163/1 "2022-07-09T07:58:47Z")

</div>

Hi

@Robert_Petitto expecting your next video is based on this 🫡

I need an example of how to use counter to increase and decrease with 2 scenarios,

1. I have a field with certain quantity say 100,so that it automatically decreases(99) if a order is made or increase(100) if the order is cancelled.

2. I have a field with no certain quantity say 0 or empty,so that it automatically increase ( 2 ) if order is made or decrease (1 )if order is cancelled.

All this should happen in product list table.  
I never used counter in my apps as of now.so i need 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:** [July 9, 2022, 12:19pm UTC](https://community.glideapps.com/t/how-to-do-counter-increase-n-decrease/44163/2 "2022-07-09T12:19:26Z")

</div>

Can an order have more than one product?

---

<div class="post-metadata">

**Author:** ![Manikandan\_R](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/manikandan_r/32/43482_2.png) [@Manikandan\_R](https://community.glideapps.com/u/Manikandan_R)\
**Post date:** [July 9, 2022, 12:23pm UTC](https://community.glideapps.com/t/how-to-do-counter-increase-n-decrease/44163/3 "2022-07-09T12:23:03Z")

</div>

No.only one product per order.

---

<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:** [July 9, 2022, 1:08pm UTC](https://community.glideapps.com/t/how-to-do-counter-increase-n-decrease/44163/4 "2022-07-09T13:08:32Z")

</div>

MUCH more straightforward then. The trick is to do increments via a relation from your orders sheet back to the products sheet:

---

<div class="post-metadata">

**Author:** ![Manikandan\_R](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/manikandan_r/32/43482_2.png) [@Manikandan\_R](https://community.glideapps.com/u/Manikandan_R)\
**Post date:** [July 9, 2022, 2:56pm UTC](https://community.glideapps.com/t/how-to-do-counter-increase-n-decrease/44163/5 "2022-07-09T14:56:23Z")

</div>

Hi

is the video covers both scenarios.

That is,with quantity and without quantity?

Thank you if it covers.

---

<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:** [July 9, 2022, 3:08pm UTC](https://community.glideapps.com/t/how-to-do-counter-increase-n-decrease/44163/6 "2022-07-09T15:08:59Z")

</div>

It doesn’t cover the second, but the process is the exact same. You’d just swap the negative value for the positive quantity when doing the increment.
