ArcadeExpression

constructor(expression: String, title: String = "", name: String = "", returnType: ArcadeExpressionReturnType = ArcadeExpressionReturnType.Automatic)

Creates a new Arcade expression with an expression string, title, name, and return type. If the Arcade expression evaluates to a result which differs from ArcadeExpressionReturnType then the result will be cast to the expected return type.

If the cast cannot be carried out, the result will be a type-specific error value. See ArcadeExpressionReturnType for details.

Since

200.1.0

Parameters

expression

The Arcade expression to be evaluated. If set to an empty expression string then the evaluation will return zero, false, an empty string, or null, depending on whether the ArcadeExpression.returnType is ArcadeExpressionReturnType.Number, ArcadeExpressionReturnType.Boolean, ArcadeExpressionReturnType.String or anything else, respectively.

title

The title of the expression.

name

The name of the expression.

returnType

The type to cast the evaluated value to.