Page 1 of 1

Sum a column from a related-item list - Change event

Posted: 25 Apr 2018
by bnunweiler
I have a related-item grid view on a form and I'm using populateFieldsInGrid. This works well. I'm using the $('.related-items').change(function(){} to parse through the rows and sum a field (KM's).

The Problem is that the comments (text) field seems to kick off the change before I can fill in the numeric (KM) field I'm trying to sum. The order I place the numeric field seems to make no difference. Thus, the sum is always off as it doesn't include the last entry.

What are your thoughts? Thanks in advance.

Re: Sum a column from a related-item list - Change event

Posted: 26 Apr 2018
by Nikita Kurguzov
Dear bnunweiler,
If nothing works, you can always use a button for calculation, although it obviously is not as user-friendly, but very reliable. I am not sure as to why the change event doesn't fire after adding the sum. Can you send us a video of what goes on? Or maybe a few screenshots with explanation of what goes on and what you want to happen instead.