--- title: "eval (Execute calculation expression)" slug: "calc-function-eval" updated: 2026-05-12T09:59:23Z published: 2026-05-12T09:59:23Z canonical: "docs.lobstersoftware.com/calc-function-eval" --- > ## Documentation Index > Fetch the complete documentation index at: https://docs.lobstersoftware.com/llms.txt > Use this file to discover all available pages before exploring further. # eval (Execute calculation expression) > [!NOTE] > $eval can be used to execute a calculation expression at runtime. > > The expression is determined and calculated at runtime. This function is only needed to execute an expression which can be read from another place and cannot be formulated statically. > > > [!TIP] > > Tooltip > > > > Syntax: *$eval(expression[,host])* > > > > | Parameter | Description | > > | --- | --- | > > | `expression` | The expression to be calculated as text, e.g. $el(3) or \{data field\}. | > > | `host` | Optional, the object to be used for the calculation expression. If the host parameter is not specified, $input is used. | > > > > Delivers the result of the expression. > > > > Example: $eval({fieldThatContainsAnExpression}) – reads the value of the field and evaluates it as an expression. ## Syntax *$eval(expression[,host])* ## Parameter | Name | Description | | --- | --- | | expression | The expression to be calculated as text, e.g. $el(3) or \{data field\}. | | host | The object to be used for the calculation expression (optional). If the host parameter is not specified, $input is used. | ## Return value The result of the expression ## Example | Syntax | Host object | Result | | --- | --- | --- | | `$eval({colorExpression})` | ```plaintext { "colorExpression": "$getStyleVar(#FE6601)" } ``` | `#FE6601` |