Variables
A variable is used to set a time limit for operation execution, select a list of productive programs, and perform various calculations. For example, you can evaluate the impact of reducing an operation’s duration by 5 minutes.
Operavix supports three variable types:
For detailed guidance on using variables in formulas, see the Formula Editor page.
Renaming a variable does not update its name in existing formulas. You must manually update the variable name wherever it is used (for example, in widget formulas, the Parameter widget, etc.).
Dashboard Variables
You can use dashboard variables in reports via the Parameter widget or in formulas.
To add a variable to a dashboard, switch to edit mode, go to the dashboard indicators tab, click + Variable, and select the variable type.
Four dashboard variable types are available:
Each variable type supports different parameters.
Input Value
A variable whose value must be entered manually. For example, you can use this variable to define a discount percentage and then apply it as a filter across multiple tables.
Column List
A variable containing a list of column names from a selected table. For example, use this variable, when the target column for a formula is not known in advance.
Static List
A variable with a manually defined list of values. In Browse mode, users can select one or multiple values from the list. For example, you can define a list of categories; selecting a category in Browse mode displays only data matching that category.
Dynamic List
A variable whose values are generated based on data available at a given moment. Use this variable when the dashboard must automatically adapt to new data. For example, a list of available dates for sales analysis that updates as new sales records arrive.
Dashboard Variable Parameters
Each variable type has its own set of parameters.
| Variable | Parameter Set |
|---|---|
| Input value | Name Data type Default value Shared value |
| Column list | Name Table Default value Shared value |
| Static list | Name List in YAML format Multiple choice Default value from the list Shared value |
| Dynamic list | Name List Predefined filters (+ Filter button) Multiple choice Default value Consider filters Shared value |
Name
By default, the variable name matches its type. For clarity, assign a unique custom name.
Data Type
The following data types are available for entered values:
- Number
- Integer
- String
- Date
- Date and time
- Boolean
Default Value
This parameter defines the variable’s default value. Its behavior varies by dashboard variable type:
- Input value — value defined via a formula
- Column list — selection of a column from the table
- Static list — selection of a value from the predefined list
- Dynamic list:
- Value defined via a formula
- The formula may reference a table column
- The default value for a dynamic list does not need to match any value in the column used for the list
If no default value is set for Input value, Dynamic list, or Static list, the variable returns null. If no default value is set for Dynamic list or Static list with multiple choice enabled, the variable returns an empty array: [].
Variables cannot be used in the default value.
Shared Value
Enable this option to make the variable shared across all users working with the dashboard. For example, use such variables to store dashboard settings. In Browse mode, these values apply to all dashboard users.
Table
Select the table whose columns will populate the Column list variable.
List
Define the list of values for Static list or Dynamic list.
Static list specifics:
- Values are specified using YAML. Click the question mark icon for formatting guidance
- The list supports strings and numbers. Data types are inferred automatically. To enforce a string type, enclose the value in quotes
Multiple Choice
Enable multiple choice, when the variable must accept multiple values from the list in Browse mode.
Predefined Filters
For Dynamic list, configure predefined filters by clicking + Filter and defining filter values. These filters affect the list values displayed in Browse mode.
- Other filters in Browse mode do not affect the Dynamic list.
- If a predefined filter formula for a Dynamic list references a variable, changing that variable’s value updates the list filtering.
- If no values match the current filter, an empty field is displayed.
Consider Filters
When the Consider filters switch is enabled, the filters set in Browse mode are applied to the values in the list.
View Variables
Input Values
Input values serve as view variables. Use them as variables in formulas for widgets in the target view. For example, use a view variable in a widget’s pre-filter formula or display its value in a widget description using Markdown.
To add a variable, open the view settings and click + Input value.
In the variable settings, specify:
- Name
- Data type: Number, Integer, String, Date, Date and time, Boolean
- Array (enable to make the variable an array of the selected data type)
- Default value (define a constant or a formula returning the selected data type. If the returned type does not match the configured type, the variable becomes invalid)
To remove a variable, click Delete.
System Variables
System variables are predefined values, that store information about system users. This variable type is described in detail on the Formula Editor page.
Was the article helpful?