How do i sum up these values

I have two tables and an action button. whenever I add [qty_sold],[price_sold], [type] for a product in orcan_form it lists it in a new row in "orcan "sheet. now, someone here helped me make an action button so that the value of [qty_sold],[price_sold], [type] is also updated in "inventory" sheet. However, it only updates my last transaction of that item and not the sum off all value for that item. i provided the expressions that he used in the screenshot below. they somehow need the "sum()" function somewhere. NO MATTER how much i tried wrapping the expressions in a sum function i kept getting an error. Is this fixable?Screen Shot 2022-03-19 at 9.32.17 PM.pngScreen Shot 2022-03-19 at 9.32.32 PM.pngScreen Shot 2022-03-19 at 9.51.59 PM.png

 

[type] = IFS(
[type0]="kept", "kept",
[qr_code].[qty_to_sell]-[qty_sold] = 0, "sold",
[qr_code].[qty_to_sell]-[qty_sold] > 0, "selling"
)

0 2 64
2 REPLIES 2

Action 1

  • For a record of this table: Orcan
  • Do this: Data - Set the values of some columns in this table
  • Set these columns:
    • Column: "qty_sold",
    • Formula: [qty_sold] + INPUT("getQty", 0)

Action 2

  • For a record of this table: Inventory
  • Do this: Data - Execute an action on a set of rows
  • Referenced table: Orcan
  • Referenced rows: LIST([qr_code])
  • Referenced action: Action 1
  • With these inputs:
    • Input: getQty
    • Formula: [qty_sold]

nope, that did not update at all, not even the last transaction.

here is what I initially had and it worked(only for the last transaction)

Screen Shot 2022-03-20 at 12.51.22 AM.pngScreen Shot 2022-03-20 at 12.55.17 AM.png

Top Labels in this Space