Table Setup:
I have Master and Detail Relationship setup. e.g. Master and Detail tables. (But normally my main concern doesn't really matter on this kind of setup. This is just to give an idea on how and why I came up with this type of problem)
Example Scenario: I'll be adding 5 records and clicked the Inline Add Button 5 times. So this means 5 empty rows ready for some inputs and this is how my problem starts:
QUESTIONs:
1.) 1 of my FieldName is named "Amount". How can I get the Total(Sum) of Amount**s from Detail BEFORE records are saved?
2.) In List or View page, displaying SUM(Totals) of some selected Fields is very easy since this is already part of its predefined functionality. How can I also display Totals **ON THE FLY while still on Inline Adding of records?
There are lots of tutorials for my 2nd question but only applies to individual record (whether List/Edit/Add etc..). BUT mine is different. This is adding Multiple Row first using Inline Add and Save all at once if done. So this means, calculations/summation occurs for all records not on every row only.
Note: This is NOT individual saving of record (like clicking on the left 'Check icon' to save each row). This is one time saving of ALL the Inline Added rows. (pls see my example scenario above to clearly understand how I work with Inline Add)
Purpose:
To compare and check if the Total Amount inputted on Master table is equal to the TOTAL Amount of all detail records to be added.
Just like: Master table has fieldName "Total Amount" w/c is $100. So before saving, the Detail entries might have _Amount_records of 10,50,20,10 and 10 that SHOULDalways equal to the Master Total Amount.
[media]

[/media]