I’m trying to capture the total of a multitude of input’s that are generated in a repeat children. I can easily get the INITIAL total of these inputs by using the data returned by server connect, however I need the real-time total as the user changes the inputs.
For example, in the screenshot below, the user can change 20.00 to 30.00, so I need access to the sum of 30 + 4 + 1:
How can I calculate the total of all the “distro_amount” fields contained within the Table Body repeat-children and store in a variable or another input?
In the repeat I do the following, which takes the id from a parent row:
scGetTrans.data.distros.where("tran", id, "==")
And then on the input I use the following to get the amount from the “distro” in the repeat: dmx-bind:value="amount.toNumber().formatNumber(2, ".", "")
So BEFORE the input values are stored in the database via update action, I need to get the total of the input values as entered by the user to validate against another value.