Force recalculation
I‘ve got a form with fields, with Subtotal and Total. The calculation order is correct, this form works perfectly.
I‘ve got another similar form that sometimes gets added to the first, with Subtotal as the last field. This works perfectly too. But when added to the first form, the Total doesn‘t work correctly across all the sheets, as the calculation order is no longer correct - the Total on the first sheet is calculated before the Subtotals on subsequent sheets.
One solution would be to stipulate that they MUST paste the extra sheets BEFORE the first sheet, then reoder them, so that Total is always calculated last. But that creates other problems.
A better solution would be to force a double recalculation whenever a subtotal is changed, using Validation. The first time would calculate all subtotals correctly, the second time would then get the correct answer in the Total. I thought this.calculateNow() should do it, or doc.calculateNow(), but this doesn‘t work. Perhaps there is a command to abandon and restart the calculation if the current field (a Subtotal field) gets changed? Can someone help me?
