Difference between revisions of "Reporting on ServiceNow Variables"

From Explore Analytics: The Wiki
Jump to navigation Jump to search
 
(11 intermediate revisions by the same user not shown)
Line 1: Line 1:
 
==Introduction==
 
==Introduction==
  
This page applies to list views using a ServiceNow data source.
+
This page applies to views using a ServiceNow data source.
  
 
==Variables==
 
==Variables==
  
ServiceNow has a special type of field called Variables. This field holds a set of multiple questions and answers.
+
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 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.
Line 13: Line 13:
 
==The Challenge with Variables in Reporting==
 
==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).
+
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==
 
==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.
+
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==
 
==Using Variables in a List==
Line 47: Line 47:
 
[[File:variables3.png]]
 
[[File:variables3.png]]
  
That's all it takes to show the memory variables as a column in our list.
+
That's all it takes to show the memory variable as a column in our list.
  
 
====Step 3: repeat for any additional variable name====
 
====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".
+
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".
  
 
[[File:variables4.png]]
 
[[File:variables4.png]]
  
==Limitations==
+
==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.
 +
 
 +
[[File: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.
  
Currently, variables cannot be used in filters and therefore the options to "Show Matching" and "Exclude" are not available for those columns. Sorting is also not currently available for those columns.
+
[[File:requested_items_chart.png]]
  
Support for variables in Pivot and Chart views is planned for the near future, so please stay tuned.
 
  
===A useful tip===
+
==Limitations==
  
The functionality available in the list opens up many possibilities if you realize that you can save that list and then use it as a regular table in which you can filter, sort, pivot and chart all the list fields including the ones that were created from variables. There are a couple of ways to turn your list into a table in Explore Analytics.
+
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).
  
# You can export the view data (File | Export this view's data) into a CSV file. You can then turn around and upload this file and store it as a table in Explore Analytics.
+
Because variables cannot be used in filters, it means that you can't drill-through to details or focus and drill down.
# The track trend feature allows you to run a view and save its output into a table. You can simply create a track trend job that runs once.
 
  
{{Template:TOC|Working with Lists|Pivot}}
+
{{Template:TOC|Working with Lists|Calculated Fields}}

Latest revision as of 12:11, 31 August 2015

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.