Setting up variables for dashboard queries, filtering data, and panel title values

As a tenant administrator or an editor, configure variables, which work as placeholders for values that you can use in dashboard queries and panel titles. Instead of hard-coding details such as server name or application name, use variables in your queries so that the system picks up the details at run time.

You can see variables in dropdown lists at the top of a dashboard.


To add a variable

  1. On a dashboard, click Dashboard settings .
    The General tab opens by default.
  2. On the left navigation bar, click Variables.
  3. On the Variables page, click New.
  4. Depending on the variable type that you select, add the remaining options. For more information about variable types, click  here Open link .
  5. Click Add.
  6. On the left navigation pane, click Save dashboard.

Important

For Service Management queries, when Query is selected as the Type, you need to specify the SQL query variable in a specified format. Here is an example of the SQL query variable format:

remedy,{"sql": "Select Distinct case when `CHG:Infrastructure Change`.`ASGRP` is not null then `CHG:Infrastructure Change`.`ASGRP` else 'Unknown' end from `CHG:Infrastructure Change` limit 500"}


To copy a variable

  1. On a dashboard, click Dashboard settings .
  2. On the left navigation bar, click Variables.
  3. On the Variables page, click Duplicate Variable  against a variable. You can see the variable copied on the same page.
  4. Click the copied variable and edit it as required.
  5. On the left navigation pane, click Save dashboard.


To edit a variable

  1. On a dashboard, click the Dashboard settings icon .
  2. On the left navigation bar, click Variables.
  3. On the Variables page, click a variable.
  4. Make your changes and click Update.
  5. On the left navigation pane, click Save dashboard.


To delete a variable

  1. On a dashboard, click Dashboard settings icon .
  2. On the left navigation bar, click Variables.
  3. On the Variables page, click Remove Variable  against the variable that you want to delete.
  4. On the left navigation pane, click Save dashboard.

To configure the variable for supported report formats

As a tenant administrator or editor, configure the supported report formats for any of the out-of-the-box BMC Helix ITSM Printable dashboards or any custom dashboard using the supported_report_types variable. After you specify the supported report formats by using this variable, users will only see those formats when they download or schedule reports:

  1. On a dashboard, click Dashboard settings .
    The General tab opens by default.
  2. On the navigation bar, click Variables.
  3. Click supported_report_types variable from the list of variables.
  4. From the Hide menu, select Variable.
  5. In the Values separated by comma field, specify the supported report types, separated by commas, and click Update. 
    For example, specify PDF,XLS,CSV to enable users to download dashboards or schedule reports in all three formats. 


To configure additional dashboard filters by using tags

As a tenant administrator or editor, configure additional filters by using various tags for custom dashboards. This feature is available with AWS (Amazon Web Services) and Azure knowledge modules. 

Let's say you are a tenant administrator who wants to filter devices based on location. You use the Variable feature to configure the location filter by using the available tags. 

  1. On a dashboard, click Dashboard settings .
    The General tab opens by default.
  2. On the navigation bar, click Variables.
  3. Create a variable called TagKeys
    1. Click Add new variable and configure the following options:
      1. Name: Specify TagKeys
      2. Type: Select Query
      3. Label: Specify TagKeys
      4. Hide: Select Variable
      5. Data source: Select BMC Helix
      6. Query: Specify entity,get_tag_keys(entity)
      7. Refresh: Select On dashboard load
      8. Sort: Select Disabled
    2. Click Update.
      You can see the list of available tags under Preview of values.



  4. Create a variable for location:
    1. On the Variables page, click New and configure the following options:
      1. Name: Specify Location
      2. Type: Select Query
      3. Label: Specify Location
      4. Data source: Select BMC Helix
      5. Query: Specify entity,get_tag_values(entity,location)
      6. Refresh: Select On dashboard load
      7. Sort: Select Disabled
    2. Click Update.
      You can see the list of locations under Preview of values.



  5. Create a variable for device name:
    1. On the Variables page, click New and configure the following options:
      1. Name: Specify deviceName
      2. Type: Select Query
      3. Label: Specify deviceName
      4. Data source: Select BMC Helix
      5. Query: Specify entity,get_entity_ids(device,{"location":"$Location"})
      6. Refresh: Select On dashboard load
      7. Sort: Select Disabled
    2. Click Update.



  6. Filter the selected dashboard based on the location of the devices.


Was this page helpful? Yes No Submitting... Thank you

Comments