Intro to Portal: Variables

Dashboard Variables

apricot_text_13 Portal allows you to use variables in your dashboard to simplify creation of panels and naming conventions. Variables allow you to create dynamic dashboards. By changing the value of the variable, using the dropdown at the top of the dashboard, your panel’s metric queries will change to reflect the new value. You can use variables in place of definite datasource, sensor, or system names. Switching between different datasources, sensors, or systems can be as easily and selecting a different value from a drop-down.

Create a Dashboard Variable

  1. Navigate to the dashboard you would like to create your variable for. Click on the common_concepts_settings_cog icon.

  2. Click on the “Variables” tab and added a new variable by clicking the variables_new_button button.

  3. From the TYPE dropdown, select which type of variable you would like to create. Then, input a name in the NAME row. This name will be the name of the variable when the it is referenced after this. The LABEL row is what the variable will show as at the top of the dashboard. If this row is left blank, the label will be the same as the name. Then in the HIDE dropdown, select if you would like to hide the label of the variable or the variable entirely on the dashboard.

  4. Lastly, input the additional variable type options. These options will vary depending on the type of variable you’re creating.

variables_create_new_variable1

Variable Types:

  • Query
  • Custom
  • Text box
  • Constant
  • Datasource
  • Interval
  • Ad hoc filters
  • system

Multivalue Variables

Multivalue variables can be used to repeat rows with panels that are similar, but need to point to different datasources.

  • To make a variable point to multiple datasources, use the following format: .Then, switch the MULTI-VALUE switch in the Selection Options section.
  • To use this variable to repeat rows, create a row with the desired panels. Then, click the gear icon next to the name of the row, and select the appropriate variable from the REPEAT FOR dropdown menu. To make the name of the rows dynamic as well, input $ and then the name of the variable in the NAME row. This will make the name of each repeated row the same as the name of the datasource.
  • Finally, go to the dropdowns at the top of the dashboard to select which datasources to repeat over in the variable.