This topic is locked

On the Fly Total Calculation on inline add rows in detail table?

3/30/2018 12:51:23 PM
PHPRunner General questions
woodey2002 author

Hi Guys,
I'm a little stuck here.
I have two tables.
"Staff" which is the master, and a detail table called "Study days"
On the add page of the Staff table the user can see and inline add information to the detail "Study days" table.
The detail "Study days" table has a field called "hours", this is an INT field where users can record inline the amount of hours each staff member has used attending a particular training course.
I would like to calculate the total value of all the hour fields on the fly ( I am aware Phprunner has this functionality built-in which can be found in the Totals tab in the application itself, this is great however for me it only totals on the edit page and I need a running total on the add page inline and on the fly)
Please see attached image



Has anyone got any ideas how I can achieve this?
I have found this example, but can't get it to work

http://asprunner.com/forums/topic/18534-on-the-fly-calculation-on-inline-add-row/
This example is also not applicable I believe due to the inline nature of the problem.

https://xlinesoft.com/phprunner/docs/how_to_calculate_values_on_the_fly.htm
Best wishes,

James