2020.1

Table Of Contents
Formatting variable data
When a Text Script, made with the Text Script Wizard (see "Using the Text Script Wizard" on
page780) adds variable data to a template, it can easily change the way the data are formatted
as well. This is done in the Text Script Wizard through a special formatting modifier or a format
mask for each field that the script adds to the template.
The available formatting functions depend on the data type of the corresponding field in the
Data Model. In a data mapping configuration you can set the data type of each field. When you
open a data file or database without a data mapping configuration, all fields are text fields
(fields of the type string).
When the software warns about a mismatch between the type of a field in the wizard and in the
current data model, click the Refresh Types button to update field types in the wizard to match
the types in the data model.
Note
The locale influences the way dates, times, numbers and currencies are formatted; see "Locale" on
page760.
Formatting can be applied to values in a Dynamic Table via the data-format attribute. See:
"Formatting values in a Dynamic Table" on page803.
You could also format data in a script using the formatter; see "Standard Script API" on
page1250.
Date
Dates in variable data can be displayed as long, medium and short dates with different time
displays. There are quite a few presets, but you can also enter a custom format mask.
1. Open the Text Script Wizard: double-click to open an existing script in the Scripts pane or
create a new Text Script using the Text Script Wizard; see "Using the Text Script Wizard"
on page780.
2. Click a data field that contains text, or add such a data field to the script with the Add field
button on the right.
Page 784