# Increment number problem

**URL:** https://community.glideapps.com/t/increment-number-problem/69241
**Category:** Ask for Help
**Tags:** actions
**Created:** [January 4, 2024, 3:18pm UTC](https://community.glideapps.com/t/increment-number-problem/69241 "2024-01-04T15:18:15Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![Lucas\_Brizotti](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/lucas_brizotti/32/67379_2.png) [@Lucas\_Brizotti](https://community.glideapps.com/u/Lucas_Brizotti)
#### Post date: [January 4, 2024, 3:18pm UTC](https://community.glideapps.com/t/increment-number-problem/69241/1 "2024-01-04T15:18:15Z")

</div>

- My **project URL** , `listavipe.glideapp.io`

**Description of the bug:**

- I can’t updated the product stock. I’m tring to refresh the inicial stock from Product Table that I created, using the increment number action and despite **no error message is reported, the action is not performed**.

**Expected behavior:**

- Is expected that action “reduce” the number of “Produto \> Estoque” colunm, add the negative values from “Pedido \> Venda” colunm

**How to replicate:**

1. Create a “Product” Table
2. Create a “Product/Stock” colunm
3. Create user-specific colunm to the user input the qty order of product
4. Creat a template colunm to transform the values on step 3 in negative values
5. Final step: creat an action to refresh “Product/Stock” colunm, increment by colum created on step 4

 ![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/f/9/f9d0088126f78b77b94d9372d620c0b563f40a4a.jpeg)

**Link to demo recording (optional):**

- [Loom | Free Screen & Video Recording Software | Loom](https://www.loom.com/share/f8628680198348a9a79319af57a5d6aa?sid=85db80c0-8883-4ade-86c7-5a60ae06b2a5)

---

<div class="post-metadata">

### Author: ![Jeff\_Hager](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/jeff_hager/32/43_2.png) [@Jeff\_Hager](https://community.glideapps.com/u/Jeff_Hager)
#### Post date: [January 4, 2024, 3:24pm UTC](https://community.glideapps.com/t/increment-number-problem/69241/2 "2024-01-04T15:24:53Z")

</div>

You can’t perform actions on multiple rows. When you click on the button, and since your increment is referring to ‘This Item’, it’s only going to increment one row, which is the row the screen is attached to. If I were to guess, it’s probably the first row in the table if you have no filters set on the screen, and since you have no value to increment in the first row, it won’t do anything.

---

<div class="post-metadata">

### Author: ![Lucas\_Brizotti](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/lucas_brizotti/32/67379_2.png) [@Lucas\_Brizotti](https://community.glideapps.com/u/Lucas_Brizotti)
#### Post date: [January 4, 2024, 3:35pm UTC](https://community.glideapps.com/t/increment-number-problem/69241/3 "2024-01-04T15:35:14Z")

</div>

Do you know if is there any alternative solution that I can apply the same concept?

---

<div class="post-metadata">

### Author: ![Lucas\_Pires](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/lucas_pires/32/64863_2.png) [@Lucas\_Pires](https://community.glideapps.com/u/Lucas_Pires)
#### Post date: [January 4, 2024, 4:27pm UTC](https://community.glideapps.com/t/increment-number-problem/69241/4 "2024-01-04T16:27:12Z")

</div>

Hi Lucas, one way to do this would be to add the quantity column to another table with the confirmed orders after the order has been placed.

That way, you’d have the initial stock quantity (eg 10) and the total number of orders already placed for the same product.

If I had ordered 2 products, this would be

> 10 (initial stock) - 2 (sum) = 8 (updated stock)

So you wouldn’t need this action, and the updated stock value would be done automatically.

---

<div class="post-metadata">

### Author: ![ThinhDinh](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/thinhdinh/32/49_2.png) [@ThinhDinh](https://community.glideapps.com/u/ThinhDinh)
#### Post date: [January 4, 2024, 11:49pm UTC](https://community.glideapps.com/t/increment-number-problem/69241/5 "2024-01-04T23:49:44Z")

</div>

Changing the category to #Ask for Help since this is not a #Report a Bug thread.

---

<div class="post-metadata">

### Author: ![Lucas\_Brizotti](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/lucas_brizotti/32/67379_2.png) [@Lucas\_Brizotti](https://community.glideapps.com/u/Lucas_Brizotti)
#### Post date: [January 5, 2024, 3:06pm UTC](https://community.glideapps.com/t/increment-number-problem/69241/6 "2024-01-05T15:06:10Z")

</div>

Hi “xará” 😃

Please, can you provide a sample of how to replicate this with simple steps?

Sorry for request this help, but my attempt generated an infinity loop to obtain the updated stock.

---

<div class="post-metadata">

### Author: ![system](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/system/32/53398_2.png) [@system](https://community.glideapps.com/u/system)
#### Post date: [July 3, 2024, 3:06pm UTC](https://community.glideapps.com/t/increment-number-problem/69241/7 "2024-07-03T15:06:57Z")

</div>

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.
