Hi,
I have an app that allows me to duplicate both Parents and Children using a bot, and I would like to transfer the previous values to the new children
The “previous total” column in the parent table is a sum of the “previous value” from child table
“value” in the child table are added manually
This are the tables
Parent table (the second row is the copy)
| Id | description | Total | previous total |
|---|---|---|---|
| sfa44 | description 1 | 100 | |
| sasak | description 2 | 300 | 100 |
Children table
| Id | Id parents | description detail | value | previous value |
|---|---|---|---|---|
| 12s | sfa44 | detail 1 | 60 | |
| 33d | sfa44 | detail 2 | 40 | |
| 76s | sasak | detail 1 | 100 | 60 |
| as3 | sasak | detail 2 | 200 | 40 |
whats is the best way to get previous values in another column when I create a child table
thanks!