Setting up variables for dashboard queries
To add a variable
- On any dashboard, click Dashboard settings
.
- In the left navigation pane, 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 Apply, then Save.
To manage variables
On a dashboard, click Dashboard settings.
In the navigation pane, click Variables, and perform the following tasks:
Task | Procedure |
---|---|
Copy a variable | Click Duplicate Variable Click the copied variable and edit it as required. |
Edit a variable | Click a variable. Make your changes and click Update. |
Delete a variable | Click Remove Variable |
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
.
- In the navigation pane, 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 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
.
- In the navigation pane, 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 display the filter data with NULL values
As a tenant administrator, filter data that contains NULL values in a dashboard. This information can help you identify missing data or incomplete records in a dashboard.
- On a dashboard, click Dashboard settings
.
- In the navigation pane, click Variables.
- On the Variables page, click the appropriate filter variable for which you want to filter the data.
- In the next screen, select Include all option and enter the following GUID in the Custom all value field:
'ARJDBC6460AC66AB204CA7BE8869BB9AF532F9' - Select Apply > Save dashboard.