Reporting on ServiceNow Variables

From Explore Analytics: The Wiki
Jump to navigation Jump to search

Introduction

This page applies to views using a ServiceNow data source.

Variables

ServiceNow has a special type of field called Variables. This field holds a set of names and values (questions and answers).

Variables are commonly used in the Service Catalog. When a user makes a service request such as requesting the purchase of a new computer, they fill a form in which they answer questions such as the amount of memory required and the size of the hard drive. These questions and answers are placed in variables.

Variables may also be used in tasks such as incidents and in workflow. The name of the variables field in all these ServiceNow tables is "variables".

The Challenge with Variables in Reporting

Variables are not like normal fields. They hold multiple names and values (questions and answers). To display several variables in columns of a list, you need to select "variables" multiple times, each time selecting another variable name (question).

Support for Variables in Explore Analytics

Explore Analytics supports variables in all view types: list, pivot, and chart. The following section shows an example of creating a list of Requested Items. We then see how to create a pivot and a chart.

Using Variables in a List

To see how to use variables in a list, let's see an example, and then show how to create it. This example shows requests for computers. For each request, we show four variables (the last four columns in the list):

  • Memory
  • CPU
  • Hard Drive
  • Operating System

Requested items.png

Step-by-Step: Adding a Variable to the List

Step 1: select the "variables" field

To add a variable to the list, drag the "Variables" field from the list of fields to the Selected Fields below. This is depicted in the following picture.

Variables1.png

The variables field may be a direct field of the table, or may be a field of a related table as shown in the next image.

Variables2.png

Step 2: select a variable name

After we drag the "Variables" field to the Selected Fields, the field settings dialog pops up. To display the amount of memory for the requested computer, we need to specify the variable name: "memory". We type that into the Variable Name field. A label (column heading) is automatically generated, but you can change it if you like.

Variables3.png

That's all it takes to show the memory variable as a column in our list.

Step 3: repeat for any additional variable name

We go back to step 1 and select "Variables" again. The settings dialog appears (step 2) and this time we'll enter the variable name "cpu_speed" and give it the label "CPU".

Variables4.png

Using Variables in a Pivot

Using variables in a Pivot works exactly the same as in a list. You select a "Variables" field, for example the Request Variables fields, and drag it to the desired pivot area. The settings dialog pops up and you type the name of the variable (e.g., "memory") into the Variable Name field. The following image shows the process.

Requested items pivot.png

Using Variables in a Chart

You can use Variables in a chart anywhere you can use a table field. For example, you can use Variables such as "memory" as a category field to show the number of computer orders by the amount of memory requested by the user with the order.

Requested items chart.png


Limitations

Currently, variables cannot be used in filters and therefore the options to "Show Matching" and "Exclude" are not available for those columns. Sorting in a List view is also not currently available for those columns (sorting is still available in pivot and chart).

Because variables cannot be used in filters, it means that you can't drill-through to details or focus and drill down.