2019.2

Table Of Contents
Setting the data type
Fields store extracted data as a String by default. The data type of a field can be changed via
the properties of the Extract step that the field belongs to.
1. Select the Extract step that contains the field. You can do this by clicking on the field in
the Data Model, or on the step in the Steps pane that contains the field.
2.
On the Step properties pane, under Field Definition, set the Type to the desired data type.
See "Data types" on page304 for a list of available types.
Changing the type does not only set the data type inside the record. In the case of dates,
numbers and currencies, it also means that the DataMapper will expect the data in the data
source to be formatted in a certain way. If the actual data doesn't match the format that the
DataMapper expects, it cannot interpret the date, number or currency as such. If for example a
date in the data source is formatted as "yyyy-mm-dd" but the default format adds the time, the
date cannot be read and the DataMapper will stop with an error.
The default format for dates, numbers and currencies can be set in the user preferences
("DataMapper preferences" on page832), in the data source settings ("Data source settings" on
page250) and per data field (in the Extract step properties, see "Data Format" on page366).
Setting a default value
You may want to set a default value for a field, in case no extraction can be made. Make sure to
set the data type of the field via the step properties (see above). Then right-click the field and
select Default Value.
The default value must match the selected data type. If the data type of the field is set to Integer,
for example, you cannot enter a value of 2,3. A default date must be formatted as a DateTime
object ("year-month-day" plus the time stamp, for example: 2012-04-11 12.00 AM); see "Date"
on page307.
Modifying extracted data
To modify extracted data - the contents of a field - you have to write a script. The script can be
entered as a Post function in a location-based field or as an Expression in a JavaScript-based
field.
Page 295