Page 1 of 1

[Added] nuEnableCalculation option

Posted: Fri Mar 03, 2023 10:54 am
by admin
nuEnableCalculation is an option that determines whether formulas (of calc objects) are automatically recalculated when changes are made to the input data. When nuEnableCalculation is set to false, formulas are not automatically updated.

There are several situations where disabling automatic calculation can be useful. One example is when adding a lot of rows to a subform and a total is displayed in a calc object. If recalculation is enabled, nuBuilder will automatically recalculate the formulas after each row is added, which can slow down the process of adding new data. By setting nuEnableCalculation to false, the user can add multiple rows and then recalculate the formulas once all the data has been entered, which can be much more efficient.

Usage:

Code: Select all

// Disable formula recalculation:
window.nuEnableCalculation = false;

// Add a lot of subform rows...

// Enable formula calculation:
window.nuEnableCalculation = true;

// Force recalculation:
nuCalculateForm();