This topic is locked

Two Tables with calcutated result

2/22/2018 2:07:09 PM
PHPRunner General questions
L
LandonH author

I have two tables with a quantity field and quantity-used field.
Table1 [Quantity]

Table2 [Quantity-Used]
When I enter a record in table 2 I want to subtract from the Quantity in table1.
This is an inventory remaining amount.
Thanks

Landon

jadachDevClub member 2/23/2018

If you want to keep a running inventory you may want to edit the current master table record and then add oldvalues to the running inventory table.
So if master table shows 10 items and you want to either add or subtract to that you can do so with JavaScript, then save. After saving add oldvalues to the running inventory table which will be a running inventory.
This way your list page can show inline all transactions associated with that record item.