Evaluate Expression

This data converter provides an opportunity to evaluate an expression.

The input text to the data converter can be used in the expression by using the INPUT notation, see the examples below.

Properties

The Evaluate Expression data converter is configured using the following properties:

Expression

Contains an expression whose result becomes the output of the data converter. The expression can refer to the input text by using the INPUT notation, see the examples later in this topic.

Description

Type in a description to be shown in the list of data converters. If there is no type in a description, one will be generated.

Examples

Get the current date and time can happen with this expression:

    now()

If the input text is "The time is " and the current time should be added, this expression can be used:

    INPUT + time(now())

Numeric calculations can also be performed. For example, if the integer attribute Item.price contains 95 and the number attribute Customer.discount contain 25.0 then the discount can be computed:

    (Item.price * Customer.discount)/100

Likewise, if the input text is "10", it can be multiplied by 20 by using this expression:

     toInteger(INPUT) + 20