# Document Properties: Variables

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. [](https://help.qlik.com/en-US/qlikview/Subsystems/Client/Content/QV_QlikView/Document_Properties_Variables.htm)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. Include in Bookmarks must be selected for the Send to Excel option to work in Qlik Cloud.

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:

Input constraint options

| Option | Description |
| --- | --- |
| No Constraints | Input values are not checked against any specified<br>constraints. |
| Standard | Input values will be checked against one of<br>a number of common standard constraints selected from the drop-down box.<br>As default no constraint at all is selected, i.e. any value can be entered<br>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<br>constraint is entered in the edit box and must be expressed as a QlikView<br>expression returning TRUE (non-zero value) if the input value is acceptable.<br>The input value is referenced as a dollar sign ($) in the expression.<br><br>Example:<br><br>$&gt;0<br>will cause the input box to accept only positive numbers in the selected<br>variable.<br><br>The previous value of the variable can be referenced by the variable<br>name.<br><br>Example:<br><br>$&gt;=abc+1<br>as a constraint on a variable named abc will cause the input box to accept<br>only numeric entries with a value of the old value plus 1. |
| Predefined<br>Values Only | Input values will be checked against a list<br>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<br>can be entered. |
| Enable Edit Expression<br>Dialog | Check this alternative to enable editing of<br>the variable value in the Edit Expression<br>dialog, which is opened from the ...<br>button that appears when clicking on the value itself. |

Constraint monitoring

| Option | Description |
| --- | --- |
| Sound on<br>Illegal Entry | Check this alternative to have QlikView issue<br>a sound warning when the user attempts to enter a value which falls outside<br>of the constraints. |
| Error Message | Normally, if the user attempts to enter a<br>value which falls outside of the constraints it will just be rejected,<br>leaving the present variable value in place. By checking this alternative<br>it is possible to specify a custom error message which will be presented to the user in case of incorrect<br>entries. The error message is typed in the edit box. It may be defined<br>as an expression for dynamic update. Click the ...<br>button to open the Edit Expression<br>dialog for easier editing of long formulas.<br><br>[Custom Error Messages](https://help.qlik.com/en-US/qlikview/September2026/Subsystems/Client/Content/QV_QlikView/Custom_Error_Messages.htm)<br><br>[Expression syntax for calculated formulas](https://help.qlik.com/en-US/qlikview/September2026/Subsystems/Client/Content/QV_QlikView/Expression_syntax_for_calculated_formulas.htm) |

In the Value List group it is specified if and how to present a list of values for an input box.

Value list options

| Option | Description |
| --- | --- |
| No List | No list of values previously used in the variable<br>is maintained. |
| List \_ Recent<br>Values | A drop-down (MRU) list with the values most<br>recently used, will be available to the user for the selected variable<br>in the input box. The number of previous values to store can be set in<br>the box. |
| Predefined<br>Values in Drop-down | A drop-down list with Predefined<br>Values will be available to the user for the selected variable<br>in the input box. |
| Predefined<br>Values with Scroll | A scroll control will be available to the<br>user for the selected variable in the input box. The scrolling will be<br>made between the Predefined<br>Values. |

[](https://help.qlik.com/en-US/qlikview/Subsystems/Client/Content/QV_QlikView/Document_Properties_Variables.htm)[](https://help.qlik.com/en-US/qlikview/Subsystems/Client/Content/QV_QlikView/Document_Properties_Variables.htm)In the Predefined Values group a list of predefined values is specified, which can be presented to the user in a drop down and/or used for defining acceptable variable values.

Value field options

| Option | Description |
| --- | --- |
| Number Series | Check this alternative to generate a list<br>of predefined numeric values based on a lower limit (From),<br>an upper limit (To) and a Step value. This option can be used<br>alone or in combination with Listed Values. |
| Listed Values | Check this alternative to specify a list of<br>arbitrary predefined values. The values can be either numeric or alphanumeric.<br>Alphanumeric values must be enclosed in quotes (e.g. 'abc'). Each value is separated by a semicolon ( ; ) (e.g. 'abc';45;14.3;'xyz' ).<br>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. |

## Learn more

* [Script variables](https://help.qlik.com/en-US/qlikview/September2026/Subsystems/Client/Content/QV_QlikView/Scripting/ScriptVariables.htm)