Category: Special function
This function evaluates the text_expression argument as an EasyMorph expression.
This function makes it possible to define EasyMorph expressions externally using parameters.
Argument | Type | Description |
---|---|---|
text_expression | Text | An expression in text format to be evaluated. |
Return value type: Any (The type of the expression output)
The argument itself must not be an expression with a reference to a column.
In an expression, the eval() function is evaluated first (pre-evaluated) and only then the whole expression is evaluated for every row. Pre-evaluation can be recursive until the final expression doesn't contain the eval() function.
eval('1+1') //Returns 2 eval('1' & '+1') //Returns 2 eval('max(1,2)') //Returns 2 eval('[Count]+1') //Evaluated as [Count]+1 eval([Count] & '+1') //Invalid! Column references are not allowed in argument expressions. eval({Param1}) //Parameter references to expressions in text format are allowed. eval("1+" & "eval('1+1')") //Returns 3 (Nesting eval() is allowed.)