Variable
Variable (also known as prompt variable) is a type of variable that obtains its value at print time.
General
About group of settings identifies the variable and sets its definition.
-
Name: unique variable name. This name is used as the variable reference during its use.
Note
Avoid using non-alphanumerical characters when defining the variable name.
Tip
Enter the name to make the variable easy to find when listed among other variables in the Dynamic Data Explorer.
-
Description: is a field that allows adding additional information and suggestions.
Definition group of settings defines which input data types are valid for a variable.
-
Data type defines what type of data is stored in a variable.
-
Text: variables that contain text.
-
Date: variables that contain date values.
-
Time: variables that contain time values.
-
Floating Point: representation of real numbers in a variable.
-
Currency: variables that contain monetary values.
-
-
Initial value: starting value that is assigned to a variable when created. It is defined using one of the following methods:
-
Manually entering a fixed value. Characters from any group of allowed characters are permitted.
Tip
If you enter full stop (".") as the initial value for a variable with selected Date or Time data type, it displays current date or time.
Example:
Edit field on a form is connected to a variable with Date selected as Data type. If full stop is selected as Initial value, the Edit field displays current date when the form is run. Drop down button opens Date picker with preselected current date.
-
Using a dynamic value. Dynamic data sources from the toolbar are supported – two options are available:
-
Enter the source as Name in square brackets, e.g. [CurrentDate], [Counter].
-
Enter the source as Name in square brackets.
-
Select the dynamic data source from the dropdown list.
-
-
Using a special character:
-
Special character can be entered manually using the less than/greater than signs, e.g. <CR>, <LF> ...
-
Special character can be selected from the dropdown list.
-
Note
Desktop Designer supports combined values as the initial value. Read more about combining the values here.
Example:
A combined initial value of a variable may contain a fixed value, a dynamic data source and special characters. The order of inserted items can be set randomly. Three options:
1. aaa123[Variable]<CR> 2. <CR>aaa123[Variable] 3. [Variable]<CR>aaa123
Tip
Make sure the inserted initial value meets the criteria defined with Output Rules for each data type.
-
Provisional value defines a custom placeholder variable value in an object while designing labels or forms. In a label object, the provisional value is replaced by the real variable value at print time. In a form object, the real variable value appears when the form is run.
-
Auto generated: generates the provisional value automatically. Disable this option to define and use a custom provisional value.
Tip
By default, provisional value equals the initial value.
If the provisional value (auto generated or custom) is empty or uses an invalid format, it is generated based on the selected variable Data type. Default formats of provisional values are listed below.
-
Six question marks (??????) for Text data type
-
Current date or time for Date data type
-
Current time for Time data type
-
9.999.999,99 for Floating point data type
-
9.999.999,99 € for Currency data type
Note
If the variable Output rules change, the provisional value format adapts accordingly.
Prompting group of settings defines the print time behavior of a data source. Read more about prompting here.
Dynamic value group defines how the last used dynamic value of a variable is handled.
Warning
If you use dynamic values and you store and print your labels in Control Center (in Documents), the dynamic variables file (.dvv) must be checked out. If .dvv file is checked in, an error will occur when printing, and labels will not print.
Instead of using dynamic values, use global variables or Save Variable Data / Load Variable Data actions in your solutions.
-
Remember the last used value (dynamic value):Desktop Designer stores the last used value of a variable. The last used value is stored in an external text file at the same location as the label or solution file. Files that store the last used values have the same filename as the label or solution, followed by .dvv extension.
Note
When sharing labels with dynamic values, make sure not to share only label or solution files (.nlbl or .nsln), but also files that store last used dynamic values (.dvv).
Note
Label or solution must be saved before enabling this option.
Example:
The last used value is useful when the continuation of numbering from the last printed label is required (e.g., serial number). Counter's last value is stored and the numbering is continued from this point at the next use.