Increment number problem

  • Myproject 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

Link to demo recording (optional):

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.

2 Likes

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

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.

1 Like

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

3 Likes

Hi “xará” :smiley:

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.

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