CalculatorWizardView.CurrentState

Syntax

CurrentState: Object

Description

The CurrentState property determines current settings of the calculator wizard in the parameters panel.

Comments

Use the setCurrentState method to set the property value, and the getCurrentState method to get the property value. Property value cannot be set from JSON.

Example

To execute the example, the HTML page must contain the WorkbookBox component named workbookBox (see Example of Creating the WorkbookBox Component). Set an expression in the calculator wizard in the Parameters panel:

// Get workbook properties panel
var propertyBar = workbookBox.getPropertyBarView();
// Get parameters panel
var parametersPanel = propertyBar.getParametersPanel();
// Display and expand this panel
parametersPanel.show();
parametersPanel.expand();
// Get calculator wizard
var calculatorWizard = parametersPanel._CalculatorWizard;
// Get the current wizard settings
var state = calculatorWizard.getCurrentState();
// Set time first series and expression
state.serie = workbookBox.getSource().getSeries()[0];
state.serie.calc = {
    formula: {
        method: {
            deterministic: {
                expression: "@_3009:0[] * 2", // Expression
            }
        }
    }
}
// Determine new settings for wizard
calculatorWizard.setCurrentState(state);
// Display calculator
calculatorWizard.show();

After executing the example the Parameters panel shows calculator wizard with the expression @_3009:0[] * 2:

See also:

CalculatorWizardView