Setting up variables for dashboard queries, filtering data, and panel title values
To add a variable
- On a dashboard, click Dashboard settings
.
- On the left navigation bar, click Variables.
- On the Variables page, click New.
Depending on the variable type that you select, add the remaining options. For more information about variable types, click here.
- Click Add.
- On the left navigation pane, click Save dashboard.
To copy a variable
- On a dashboard, click Dashboard settings
.
- On the left navigation bar, click Variables.
- On the Variables page, click Duplicate Variable
against a variable. You can see the variable copied on the same page.
- Click the copied variable and edit it as required.
- On the left navigation pane, click Save dashboard.
To edit a variable
- On a dashboard, click the Dashboard settings icon
.
- On the left navigation bar, click Variables.
- On the Variables page, click a variable.
- Make your changes and click Update.
- On the left navigation pane, click Save dashboard.
To delete a variable
- On a dashboard, click Dashboard settings icon
.
- On the left navigation bar, click Variables.
- On the Variables page, click Remove Variable
against the variable that you want to delete.
- 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:
- On a dashboard, click Dashboard settings
.
The General tab opens by default. - On the navigation bar, click Variables.
- Click supported_report_types variable from the list of variables.
- From the Hide menu, select Variable.
- 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.
- On a dashboard, click Dashboard settings
.
- On the navigation bar, click Variables.
- Create a variable called TagKeys.
- Click Add new variable and configure the following options:
- Name: Specify TagKeys
- Type: Select Query
- Label: Specify TagKeys
- Hide: Select Variable
- Data source: Select BMC Helix
- Query: Specify entity,get_tag_keys(entity)
- Refresh: Select On dashboard load
- Sort: Select Disabled
- Click Update.
You can see the list of available tags under Preview of values.
- Click Add new variable and configure the following options:
- Create a variable for location:
- On the Variables page, click New and configure the following options:
- Name: Specify Location
- Type: Select Query
- Label: Specify Location
- Data source: Select BMC Helix
- Query: Specify entity,get_tag_values(entity,location)
- Refresh: Select On dashboard load
- Sort: Select Disabled
- Click Update.
You can see the list of locations under Preview of values.
- On the Variables page, click New and configure the following options:
- Create a variable for device name:
- On the Variables page, click New and configure the following options:
- Name: Specify deviceName
- Type: Select Query
- Label: Specify deviceName
- Data source: Select BMC Helix
- Query: Specify entity,get_entity_ids(device,{"location":"$Location"})
- Refresh: Select On dashboard load
- Sort: Select Disabled
- Click Update.
- On the Variables page, click New and configure the following options:
- Filter the selected dashboard based on the location of the devices.
To configure additional date filters by using variables
As a tenant administrator or editor, add additional date filters to your dashboards. BMC Helix Dashboards allows you to filter data by using the default date filter. However, by using this option, you can filter data in your dashboards and panels by multiple date ranges.
- On a dashboard, click Dashboard settings
.
- On the navigation bar, click Variables.
- Create a new variable and configure the following options:
- Name—Specify a name for the variable.
For example, let's specify DateRange as the name of the variable. - Type—Select Date Range.
- Label—Specify a label for the additional date filter that will be visible on your dashboards screen.
For example, let's specify Date Range. - Select Time Range—Select the appropriate date/time range.
- Name—Specify a name for the variable.
- Click Update.
Now, modify the SQL query of your dashboard's panel to filter data based on the newly added additional date filter.
For example, use the following query to filter the incident details:`HPD:Help Desk`.`Date Range` between '${DateRange:from}' and '${DateRange:to}'where, HPD:Help Desk is the form name and ${DateRange:from} and ${DateRange:to} indicate the date range selected in the additional date filter.
You can repeat the above steps to create multiple date filters in the same dashboard.
To filter the Service Dashboard by services
As a tenant administrator or editor, filter the Service Dashboard by services. By default, the Service Dashboard displays data for the business services that are present in your tenant. By using variables, you can choose to display the metrics either for business or for technical services.
- On the Service Dashboard, click Dashboard settings
.
- On the navigation bar, click Variables.
- Create a new variable and configure the following options:
- Name—Specify a name for the variable.
For example, let's specify serviceName as the name of the variable. - Type—Select Query.
- Label—Specify a label.
For example, let's specify Service Name. Query—Specify the following query to display the business services in your tenant:
smartgraph,{"query":"search BusinessService show #id,name","displayName":"name"}
- Name—Specify a name for the variable.
- Click Update.
Examples
Specify the following query to display the list of business services that are mentioned in the query:
smartgraph,{"query":"search BusinessService where name in ['KM Service', 'Windows Service'] show #id,name","displayName":"#id"}where the data is displayed for the KM and Windows services.
Specify the following query to display all the business services that contain Windows in their names:
smartgraph,{"query":"search BusinessService where os_type has subword "Windows" show #id,name","displayName":"#id"}
To create cascading filters in dashboards
As a tenant administrator or editor, you can create cascading filters for a dashboard. In cascading filters, when the first filter is selected, the second filter displays values relevant to the first filter.
Let's say you are a tenant administrator who wants to view the incident details of an assigned group for a selected company. Additionally, you want to view the high priority incident details for a selected assigned group. You can create cascading filters for the company, assigned groups and priority to filter their data based on the selection of the other filters.
- On a dashboard, click Dashboard settings
.
- On the navigation bar, click Variables.
- Create a variable for company:
- Specify a name for the variable.
For example, let's specify company. - From the Type list, select Query.
- Specify a label for the list of the companies.
For example, let's specify Company. Specify the following query to display the list of the companies:
remedy,{"sql": "SELECT DISTINCT `HPD:Help Desk`.`Company` FROM `HPD:Help Desk` LIMIT 500"}- Click Update.
- Specify a name for the variable.
- Create a variable for assigned groups:
- Specify a name for the variable.
For example, let's specify assignedGroup. - From the Type list, select Query.
- Specify a label for the list of the assigned groups.
For example, let's specify Assigned Group. Specify the following query to display the list of the assigned groups based on the company:
remedy,{"sql": "SELECT DISTINCT `HPD:Help Desk`.`Assigned Group` FROM `HPD:Help Desk` WHERE `HPD:Help Desk`, `Company` = $company LIMIT 500"}where WHERE `HPD:Help Desk`, `Company` = $company retrieves the list of the assigned groups based on the selected company.
To select assigned groups against multiple companies, enable the Multi-value option and specify the following query:remedy,{"sql": "SELECT DISTINCT `HPD:Help Desk`.`Assigned Group` FROM `HPD:Help Desk` WHERE `HPD:Help Desk`, `Company` in ($company LIMIT 500"}- Click Update.
- Specify a name for the variable.
- Create a variable for priority:
- Specify a name for the variable.
For example, let's specify priority. - From the Type list, select Query.
- Specify a label for the list of the priorities.
For example, let's specify Priority. Specify the following query to display the list of the assigned groups based on the company:
remedy,{"sql": "SELECT DISTINCT `HPD:Help Desk`.`Priority` FROM `HPD:Help Desk` WHERE `HPD:Help Desk`, `Assigned Group` = $assignedGroup LIMIT 500"}where WHERE `HPD:Help Desk`, `Assigned Group` = $assignedGroup retrieves the list of the priorities based on the assigned group.
To select priorities against multiple assigned groups, enable the Multi-value option and specify the following query:remedy,{"sql": "SELECT DISTINCT `HPD:Help Desk`.`Priority` FROM `HPD:Help Desk` WHERE `HPD:Help Desk`, `Assigned Group` in ($assignedGroup) LIMIT 500"}- Click Update.
- Specify a name for the variable.
On the Variables page, click Show dependencies to display the cascading filter mapping.