Using Application Variables

By - Apr 29, 2013

Application variables are useful for defining global string variables that can be used in forms and rules. The variable value can be updated in a single place with the impact across the application.

Creating an Application Variable

Here we can add application variables directly through UI. Select Variable under Application Settings in the navigation menu. You can add application variables by clicking Add button in the ribbon.

There are two ways to define a variable. You can double click the variable name and write its definition directly. Application variables are recursive by nature, thus they can contain other variables in its definition. To reference another variable within a definition, use the following syntax “${variable name}”.

Or you can use a script to manage the variable. To see details, refer to Deployment Application.

We have to deploy the application after adding variables. When migrating application variables from one environment to another, we can use the import or export functionality.

UseĀ Application Variables

  • In SQL Rules

All variables are contained in the [dbo].[applicationvariable] table. Here we can refer to the variable name and value through SQL queries.

  • Use in MDX Rules

Application variables can also be used in MDX script. Upon deployment, the variable values will be deployed in the place of the variable names.


  • Use in Forms

We can also use application variables when designing forms. In the example below, ${Prior Months} and ${Forward Months} are both application variables

To add a variable, first choose the axis dimensions you want to add the variable to, then click Variable button in the ribbon. You can select from all the application variables available in the Variable Picker box.