The Document Properties : Variables page shows the script variables that have been added to Displayed Variables in the input box properties. The list of variables may be modified by the Show System Variables option. The New... button adds a new variable to the document. Delete button removes the selected variable.
In the Settings for Selected Variable group the edit box displays the current Value of the selected variable. The value may be entered as a calculated formula. Click on the ... button to open the Edit Expression dialog.
Variables are normally not included in bookmarks, but here it is possible to check the option Include in Bookmarks.
The Input Constraints group specify constraints against which all values entered into an input box variable by the user will be checked. If a value does not meet the constraints specified, it will be rejected and an error message may be shown. The following alternatives are available:
|No Constraints||Input values are not checked against any specified constraints.|
|Standard||Input values will be checked against one of a number of common standard constraints selected from the drop-down box. As default no constraint at all is selected, i.e. any value can be entered into the variable. Only one of the alternatives: Standard, Custom, Predefined Values Only and Read-only can be checked.|
|Custom||Input values will be checked against a user specified constraint. The
constraint is entered in the edit box and must be expressed as a QlikView
expression returning TRUE (non-zero value) if the input value is acceptable.
The input value is referenced as a dollar sign ($) in the expression.
$>0 will cause the input box to accept only positive numbers in the selected variable.
The previous value of the variable can be referenced by the variable name.
$>=abc+1 as a constraint on a variable named abc will cause the input box to accept only numeric entries with a value of the old value plus 1.
|Predefined Values Only||Input values will be checked against a list of values defined in the Predefined Values group. Only input values found in the list will be accepted.|
|Read-only||Marks the variable as read-only. No values can be entered.|
|Enable Edit Expression Dialog||Check this alternative to enable editing of the variable value in the Edit Expression dialog, which is opened from the ... button that appears when clicking on the value itself.|
|Sound on Illegal Entry||Check this alternative to have QlikView issue a sound warning when the user attempts to enter a value which falls outside of the constraints.|
Normally, if the user attempts to enter a value which falls outside of the constraints it will just be rejected, leaving the present variable value in place. By checking this alternative it is possible to specify a custom error message which will be presented to the user in case of incorrect entries. The error message is typed in the edit box. It may be defined as an expression for dynamic update. Click the ... button to open the Edit Expression dialog for easier editing of long formulas.
In the Value List group it is specified if and how to present a list of values for an input box.
|No List||No list of values previously used in the variable is maintained.|
|List _ Recent Values||A drop-down (MRU) list with the values most recently used, will be available to the user for the selected variable in the input box. The number of previous values to store can be set in the box.|
|Predefined Values in Drop-down||A drop-down list with Predefined Values will be available to the user for the selected variable in the input box.|
|Predefined Values with Scroll||A scroll control will be available to the user for the selected variable in the input box. The scrolling will be made between the Predefined Values.|
|Number Series||Check this alternative to generate a list of predefined numeric values based on a lower limit (From), an upper limit (To) and a Step value. This option can be used alone or in combination with Listed Values.|
|Listed Values||Check this alternative to specify a list of arbitrary predefined values. The values can be either numeric or alphanumeric. Alphanumeric values must be enclosed in quotes (e.g. 'abc'). Each value is separated by a semicolon ( ; ) (e.g. 'abc';45;14.3;'xyz' ). This option can be used alone or in combination with Number Series.|
|Comment||This is a commentary field where the creator of a variable can describe its purpose and function.|