a!localVariables() Function

Lets you define one or more local variables for use within an expression. When used within an interface, the value of each variable can be refreshed under a variety of conditions, configured using a!refreshVariable(). When used outside of an interface, all refresh properties configured using a!refreshVariable() are ignored.


a!localVariables( localVar1, …, [localVarN], expression)

localVar1: (Any Type) The local variable to use when evaluating the given expression. Use the local! domain to define and reference individual variables. By default, a local variable will automatically update when any variables it references are changed. To change the way variables are updated in an interface, use the a!refreshVariable() function. Variables can be refreshed under the following conditions: after each reevaluation, periodically on an interval, or when other variables change.

localVarN: (Any Type) Any additional local variables, as needed.

expression: (Any Type) The expression to evaluate using the local variables' values.


Any Type


For more information about how to use a!localVariables and a!refreshVariable, including detailed examples, see the Local Variables page.

This function replaces both the load and with functions. For information on how to update existing expressions that use load and with to use a!localVariables instead, see the Updating Expressions to Use a!localVariables.

Open in Github Built: Thu, Feb 23, 2023 (02:59:22 PM)

On This Page