Boolean

Booleans are a simple true/false data type often used in conditions and comparisons.

Defining Boolean values

  • Preprocessor:

    • In the Step properties pane, under Properties, add or select a field.

    • Specify the Type as Boolean and set a default value of either

      true

      or

      false

      , followed by a semicolon.

  • Extraction:

    • In the Data Model, select a field.

    • On the Step properties pane, under Field Definition set the Type to Boolean.

    The field value must be

    true

    or

    false

    .

  • JavaScript Expression: Set the desired value to either

    true

    or

    false

    . Example:

    record.fields["isCanadian"] = true;

The value must be all in lowercase:

true

,

false

. Any variation in case (True, TRUE) will not work.

Boolean expressions

Boolean values can be set using an expression of which the result is true or false. This is done using operators and comparisons.

Example: record.fields["isCanadian"] = (extract("Country") == "CA");

For more information on JavaScript comparison and logical operators, please see w3schools.com or developer.mozilla.org.