Expression Variables

Variables are available within expressions to enable modularity and reusability of business logic.  Global variables are defined at the top level and can be used anywhere within an expression.  Local variables are defined within a particular IF statement and are limited to that scope only.  Each variable has a specific data type and variable values can be assigned when a variable is first defined or later within the expression. Using variables for repeated logic can also improve calculation performance of expressions by caching initial results and subsequently retrieving the cached values.  Variables can be used in any expression context including calculated names and parents, derived properties, custom validations, and filters for policies, subscriptions, and extracts.

Business Benefit: Variables can greatly simplify and improve the organization of complex business logic in expressions. Using variables when evaluating the same node collection multiple times in the same expression can also significantly increase calculation performance.

Key resources