How can I set up a database entry to be the result of multiple other entries?
For example, a Database entry named ‘Grand Total’.
Grand total should update from (‘Source A’) + (‘Source B’ * ‘Value A’) + ('Source C * ‘Value B’) etc…
Ideally id like to do all of this math hidden away, and it just simply update the database entry and then i can read out that final value where its needed.
The only way I can think to do this now is to create an input (input 1) that is (‘Source B’ * ‘Value A’) Then another input (input 2) that is ('Source C * ‘Value B’) and then lastly a final input (input 3) that is ‘Grand Total’ = ‘Input 1’ + ‘Input 2’ + ‘Input 3’…
This just doesn’t seem practical though, i feel like there is a better way.
I went about this as mentioned. Using inputs to total up the values then using a workflow to add up all of the inputs into the grand total which works to some degree but it doesn’t seem like a good solution. As this only works for the page with the inputs. So if these values get adjusted on any other page, the Grand total is no longer accurate until visiting the page with the inputs to rebalance the grand total.
Im going to investigate some of the lessons based on shopping carts to see if i can figure out a solution as it seems shopping cart logic would be similar.