Fuego.Dynamic : BooleanExpression

The BooleanExpression component evaluates a String that contains a PBL boolean expression. This component supports all the available code styles in PBL.

Note: The String must include a return statement.

Example

In the following example, the BooleanExpression component evaluates a String that contains a boolean expression.

validator as BooleanExpression isValid as Bool
  validator = BooleanExpression(
        expression : "return price > threshold and price < 10000.0",
        arguments : ["price" : "Decimal", "threshold" : "Decimal"] )

  isValid = evaluate(validator,
                     arguments : ["price" : 100.0, "threshold" : 10.0])

  display isValid