I have an expanding table that allows adding and deleting rows. There is a grand total cell that accurately calculates the total. The issue is that, when I delete a row, the grand total does not update unless I make a change to one of the applicable cells in the remaining rows. How do I set my Grand Total cell to automatically recalculate when the Delete Line button is clicked?
So as we discussed offline your code is good. The issue is that you are viewing the file with PDF X-Change. I have reached out to them and they have acknowledged that this is not working in their software. They claim it will be fixed in an update.
The calculated sum should change as long as the code is correct and in the right place.
In the flowable tutorial the Sub Total field has sum(Table.Table1.Row1[*].amount[*]) in it's FormCalc calculate event. Calculate event code continually calculates as things change in the form. When you click a button to remove a row, the amount should change.
In this example, the amount is summed and added to the SubTotal. The * adds all items in the column. Code isnt needed in the delete row button in this instance. The code in the calculate event does it all for you.
Thanks for your suggestion. I actually have a working expandable table with a calculated sum. The issue is, if I delete a line using my delete line button, the sum doesn't recalculate (and subtract the missing row's value) unless I then edit a remaining row. I've taken a look through Adobe's Tutorials, but I can't seem to find anything to address this issue.