1.8

Table Of Contents
Example
The following script creates a date that is the current date + 30 days:
function addDays(date, days) {
var result = new Date(date);
result.setDate(result.getDate() + days);
return result;
}
addDays(new Date(), 30);
Float
Floats are signed, numeric, floating-point numbers whose value has 15-16 significant digits.
Floats are routinely used for calculations. Note that Float values can only have up to 3
decimals. They are inherently imprecise: their accuracy varies according to the number of
significant digits being requested.
The Currency data type can have up to 4 decimals; see "Currency" on page170.
Defining Float values
l
Preprocessor:
l
In the Step properties pane, under Properties, add or select a field.
l
Specify the Type as Float and set a default value as a number with decimal points,
followed by a semicolon; for example 546513.879;.
l
Extraction:
l
In the Data Model, select a field.
l
On the Step properties pane, under Field Definition set the Type to Float.
The field value will be extracted and treated as a Float.
l
JavaScript Expression: Set the desired value to any Float value.
Example: record.fields["PreciseTaxSubtotal"] = 27.134;
Building Float values
Float values can be the result of direct attribution or mathematical operations just like Integer
values (see "Integer" on the next page).
Page 174