Welcome to the nuBuilder forums!

Please register and login to view forums and other content only available to registered users.

[Added] nuEnableCalculation option

Information about updates, news, Code Library
admin
Site Admin
Posts: 2778
Joined: Mon Jun 15, 2009 2:23 am
nuBuilder Version: 4.5

[Added] nuEnableCalculation option

Unread post 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();
Post Reply