What are "variables" and how are they different to fields?

In short, variables in ServiceNow are arbitrary fields on something that can take many forms and aren't tied to columns or fields in a table.

Typically, they are stored in a variable table of sorts in a key-value layout of "this variable has this value".

This is different to columns or fields in ServiceNow which are firmly-defined columns on a database table.

Almost all kinds of variable definitions extend from the parent "Variable" [var_dictionary] table.

Here's some examples of the differences between fields and variables.

Fields and variables on a requested item

Fields on a record

Variables in a list

What variables belong to which requested item

Catalog variables

There are 2 main areas for variables in catalog items:

  • The variables configured for the catalog items and variable sets. They form a "template" of sorts.
  • The variable instances & values themselves for the requested items. These are copies of the variable "templates" configured on the catalog items.

This method of making copies of the variables whenever they are used prevents variables from being broken on existing catalog requests whenever changes are made to the catalog items.

This includes formatting variables, including section starts & ends, and annotations.

Here's a diagram of the most common kinds of catalog variables.

Diagram of catalog variables

Here's a list of all of the tables involved in catalog variables that I could find.

Table Notes
Extends "Question" [question]
The variable as it is configured on the Catalog Item / Variable Set.
The variables and values for a request.
Producer Set
Extends "Variable Set" [item_option_new_set]
Same as Options [sc_item_option] but for record producers.
Variable ownership
A many-to-many table linking requested items [sc_req_item] to variables [sc_item_option].
Which variables are visible on what catalog tasks.
Multi Row Question Answers
Appears to be a many-to-many table for multi-row variable sets, including what the question was, what set it's for, and the answer / value.
Variable Set
Definitions for variable sets.
Item Options
Appears unused.
Variable Category
Appears unused.
Variable Layout
Extends "Question" [question]
Appears unused.


Underneath a large portion of variable functionality is something called "Questions". Some of the variable tables extend from "Questions" functionality, but not all of them.

Table Notes
The definition of some variables / questions.
Question Answers
The instances and values of some kinds of variables, including the below. I suspect that records created by record producers have the variables saved in this table.
Variables on CSM cases
Variables on Incidents
Variables on Standard Change Proposals
Variables on User Groups
Question Choice
Choice values & price data for choice question variables.
Question Regular Expressions
Regular expression validations that can be used on question variables.

System variables

There are many areas within the system of ServiceNow which utilise arbitrary forms and fields, including Integration Hub and Connections. These are typically stored within the below tables.

Table Notes
Holds the definition of the variables.
Holds the values of variables. A lot of Workflow (not Flow) and Integration Hub values live in here.
[var__m_*] Auto-generated tables to hold variable values.
E.g. [var__m_sys_hub_step_ext_output_4f1590a253a1301026b0ddeeff7b1279]

Variables relating to the ServiceNow Automated Testing Framework.

Table Notes
Test Variable
Extends "Variables" [var_dictionary]
The parent for all of the different kinds of ATF variables
Input Variables
Extends "Test Variable" [sys_atf_variable]
Output Variables
Extends "Test Variable" [sys_atf_variable]
Parameter Variable
Extends "Variables" [var_dictionary]
Table Notes
Flow Data Variable
extends "Variables" [var_dictionary]
Flow Catalog Variable
extends "Variables" [var_dictionary]
Table Notes
Activity Variables
extends "Variables" [var_dictionary]
Workflow SC Variable
extends "Variable" [item_option_new]