2018.1

Table Of Contents
2.
On the Step properties pane, under Field Definition, click the Add JavaScript Field
button next to the Field List.
3.
On the Step properties pane, under Field Definition, enter the script in the Expression
field.
By changing a field's mode
Alternatively you can change a location-based into a JavaScript-based field.
1. Select the field in the Data Model.
2.
On the Step properties pane, under Field Definition, change its Mode to JavaScript.
3.
Enter the script in the Expression field.
Property-based field
A property-based field is filled with the value of a property.
Objects such as the sourceRecord and steps have a number of predefined properties. (For an
explanation of the objects to which the properties belong, see "DataMapper Scripts API" on
page305.)
Custom properties can be added via the Preprocessor step; see "Preprocessor step" on
page191.
A property-based field cannot be added directly. To fill a field with the value of a property, you
have to change an existing field's Mode to Properties.
1. Select the field in the Data Model.
2.
On the Step properties pane, under Field Definition, change its Mode to Properties.
3.
Select the property from the Property drop-down list, or click the button to the right, to
open a filter dialog that lets you find a property based on the first few letters that you type.
Another way to add the value of a property to a field is by setting the field's Mode to JavaScript
and entering the corresponding property in the Expression field, e.g.
data.properties.myProperty;.
Page 208