Skip to main content
OnCommand Insight

More on dashboard variables

Contributors

Dashboard variables come in several types, can be used across different fields, and must follow rules for naming. These concepts are explained here.

Variable types

A variable can be one the following types:

Text: Alphanumeric string. This is the default variable type.

Numerical: a number or range of numbers.

Boolean: Use for fields with values of True/False, Yes/No, 0/1, etc. For the boolean variable, the choices are Yes, No, None, Any.

Date: A date or range of dates.

“Generic” variables

You can set a generic or universal variable by clicking the Variable button and selecting one of the types listed above. These types are always shown at the top of the drop-down list. The variable is given a default name, for example “$var1”, and is not tied to a specific annotation or attribute.

Configuring a generic variable allows you to use that variable in widgets to filter for any field of that type. For example, if you have a table widget showing Name, Alias, and Vendor (which are all text-type attributes), and “$var1” is a text-type variable, you can set filters for each of those fields in the widget to use the $var1 variable. You can set other widgets to use $var1 for those or any text fields.

On your dashboard page, setting $var1 to a value (for example “NetApp”) will filter all of those fields in all widgets that are set to use that variable. In this way, you can update multiple widgets at once to highlight dashboard data you choose at will.

Because generic variables can be used for any field of that type, you can change the name of a generic variable without changing its functionality.

Note

All variables are treated as "generic" variables, even those you create for a specific attribute, because all configured variables of a type are shown when you set a filter for any attributes or annotations of that type. However, best practice is to create a generic variable when you will use it to filter for a value across multiple fields, as in the Name/Alias/Vendor example above.

Variable naming

Variables names:

  • Must always be prefixed with a “$”. This is added automatically when you configure a variable.

  • Cannot contain any special characters; only the letters a-z and the digits 0-9 are allowed.

  • Cannot be longer than 20 characters, including the “$” symbol.

  • Are not case-sensitive: $CityName and $cityname are the same variable.

  • Cannot be the same as an existing variable name.

  • Cannot be only the “$” symbol.

Widgets that use variables

Variables can be used with the following widgets:

  • Area Chart

  • Bar Chart

  • Box Plot Chart

  • Line Chart

  • Scatter Plot Chart

  • Single Value Widget

  • Spline Chart

  • Stacked Area Chart

  • Table Widget