Automatic parameter definition
Introduction¶
A form’s run parameters can be defined manually, where the user chooses the desired value from a list of values, or automatically, where the system defines the parameter based on behaviours defined by the administrator user.
Automatic parameter definition methods¶
When the user does not define an optional parameter, it can be defined automatically according to two methods.
| Method | Description |
|---|---|
| Input default value | The system automatically selects the value indicated as the default value in the parameter settings. |
| Define using dynamic script | The system reads a dynamic script defined by the user in the parameter settings to calculate the default value. |
Details of dimensional parameters with default values¶
When a default value is has been set on a CCH Tagetik dimensional parameter in the definition step, the system will behave in one of the following ways:
- In the presence of parameters with a default value selected by the user or with a default value comprising the output of a TGKML script, when the Do not display when the default value is specified option is active, the parameter will not be shown in the parameters selection window (see Parameters window), but the value will be shown directly in the form. When this happens for all the parameters that can be selected in the parameters selection window, the window will not be show.
- For web forms launched from workflow, from which the scenario, period and entity can be unambiguously inferred, when the form is run the default value will be ignored and the parameter will be defined with the value used in the context.
- In the presence of parameters set with default values, when the Advanced restriction type option is active, when the form is run the default value will be ignored and the parameter will be defined with the value selected in the adjacent dimensions tree.
The described behaviours are also valid when parameters are selected on opening a DTP (see Parametric DTPs).
Details of advanced selection scripts for calculating the default value¶
The requirements for defining an advanced selection script to define run parameters are as follows:
- The script must return a single dimensional element (if it returns more than one, the default parameter value will be the OR of all elements).
- The script does not depend on the value of other parameters that have already been set or filters present in the form.
When the script returns an error, an element that is not visible, or an element that is not compatible with the user restrictions and/or characteristics of the parameter, the default value will not be set.

IMPORTANT: if the element code set as default is changed, the attribute will be invalidated.
For more details on the advanced selection, see Dynamic matrices.