Reporting on ServiceNow Variables
Contents
Introduction
This page applies to list views using a ServiceNow data source.
Variables
ServiceNow has a special type of field called Variables. This field holds a set of multiple 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 list 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 List views. The following section shows an example of creating a list of Requested Items.
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 show Requests for computers. For each request, we show four variables (the last four columns in the list):
- Memory
- CPU
- Hard Drive
- Operating System
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.
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.
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.
That's all it takes to show the memory variables 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 select the variable name "cpu_speed" and give it the label "CPU".