In this article:
Adding, Moving and Deleting Calculation Algorithm
Setting Up Properties of Selected Calculation Algorithm
General Settings of Calculation Algorithm
Setting Up Link of Calculation Algorithm and Data Entry Form Parameters
To calculate and control table area data, use created calculation algorithms.
NOTE. Selecting a calculation algorithm is available only if the Calculation Algorithms extension is installed.
To select calculation algorithms, use the Calculation Algorithms window:
Elements of the Calculation Algorithms window
To determine a calculation algorithm:
Add a ready calculation algorithm.
Set up properties of the selected algorithm:
Determine general algorithm settings.
Set up links between algorithm and data entry form parameters.
After setting up calculation algorithms close the editor and finish creating a table area by clicking the Add button, or click the Save button after editing table area.
After the table area is set up, follow the step if required:
To add algorithms:
Click the Sources button on the tab panel. The Sources side panel opens.
Go to the Algorithms tab.
Hover the cursor to the required algorithm. The cursor will change for . Drag the algorithm to the tab depending on the calculation execution option.
Depending on the calculation execution option, add algorithm to the tab:
To Change. Algorithms added to this tab will be executed when data will changed in data entry form. Calculation is executed in cells that use changed data in formulas. Cell values calculated by means of the connected calculation algorithm are displayed as changed data.
To Save. Algorithms added to this tab will be executed only when data will be saved in data entry form; when data changes, the calculation will not be executed. The calculation is executed in sources by all data.
To set up calculation algorithm order, drag algorithms on the tab.
To delete the selected algorithm, click the Delete button on the tab toolbar.
To set up properties of the selected calculation algorithm, select it in the Selected Calculation Algorithms area. Depending on the algorithm type, various settings are available. The algorithm type is determined automatically. The type of calculation algorithm is specified in the Selected Calculation Algorithms area table in the Type column:
Calculation. The algorithm contains only calculation blocks. It can be added to the To Change and To Save tabs.
Control. The algorithm contains only control blocks. It can be added only to the To Change tab.
Calculation/Control. The algorithm contains both calculation blocks and control blocks. It can be added to the To Change and To Save tabs.
Determine general settings of calculation algorithm in the Selected Calculation Algorithms area:
If required deselect the checkbox next to the algorithm in the On column to confirm debugging og claculation algorithms work in data entry form. Checkboxes are selected for all algorithms by default.
Select the checkbox next to the algorithm in the Save Data column to save data to the source. It is available on the To Change tab. When the checkbox is selected, data in cells calculated by the algorithm is saved to the source on saving data or saving data entry form. If data in cells is calculated by several algorithms, data calculated by the last algorithm with enabled setting is saved. If the checkbox is deselected, then data in cells calculated by the algorithm are not saved to the source, but are saved in the form. To display the last saved source data in cells calculated by algorithm without saving data, disable algorithm calculation or delete it.
Select the type of calculation area creation that will be used on algorithm calculation from the Calculation Area drop-down list:
Selection intersection. The intersection of selection from algorithm by all dimensions with selection from table area will be used for calculation. Selected by default.
Calculation Period from Algorithm. The intersection of selection from algorithm by all dimensions, except the calendar one, with selection from table area will be used for calculation.
All Selection from Algorithm. All selection from algorithm without taking into account selection from table area will be used for calculation.
It is available on the To Change tab.
Select the checkbox next to the algorithm in the Expand Selection column to expand the range of loaded data based on the selection specified in the algorithm. It is available on the To Change tab. When the checkbox is selected, all values specified during algorithm setup will be taken into account in calculation and not only displayed in table area.
Set up table area refresh on data saving. To do this, click the Automatic Refresh button on the toolbar. It is available for algorithms added to the To Save tab.
Set up changed data save locking in table area with applied control. To do this, click the Lock Saving of Changed Data in Table Area if Control Worked button. When saving changed data if control worked at least for one table area, the information message is displayed informing that entered data must be corrected. When operations resulting in table area refresh are executed: saving, refreshing, changing parameter values, closing data entry form; transposing and editing table area - the warning is displayed informing that change data will not be changed because it does not satisfy control settings. When canceling operation the changed data remains in table area. It is available when the Control calculation type is selected on the To Change tab.
Set up link between calculation algorithm parameters and data entry parameters on the Properties of Selected Algorithm, selecting:
Value Type. Determine values that are used on calculation algorithms:
Form Parameter. Calculation uses parameter value of data entry form.
Constant Value. Calculation uses a constant value.
Selection Type. Depending on the selected value type:
If the Form Parameter type is selected, choose the selection type in the drop-down list. Available values: initial, first element, last element, initial+children, initial+children (recursive), children, children (recursive)
If the Constant Value type is set, the selection type is unavailable.
Dictionary Schema. Select selection schema of dictionary used as algorithm parameter in the drop-down list. If selection schema is not set for dictionary, the list will be empty.
NOTE. Dictionary selection schema has a greater priority than selection type.
Value. Depending on the selected value type:
If the Form Parameter type is selected, determine parameter or form parameter attribute by selecting it in the drop-down list.
If the Constant Value type is selected, set the constant value.
If calculation algorithm and data entry form are built on the same source, algorithm parameters will be automatically bound to data entry form parameters. Default values:
Value type: Form parameter
Selection type: Source
Dictionary schema: undefined
Value: parameter built on the same dictionary.
See also:
Building Data Entry Form | Working with Ready Data Entry Form