Glide Variables

ServiceNow uses a special type of super flexible variable to store information in what appears like a single field, but is actually a complex storage/management system with a database column type called glide_var.As each record can have a different number of variables stored as key/value pairs, there’s no easy way of dot-walking to the name of the variable within the glide_var as the names can change from record to record within the same table! You can, however, detect and retrieve variables from a glide_var by treating the gliderecord field as an object.
In this example, from an automated test framework step, you can see each of the variables and their values from the database glide_var column inputs.
var gr = new GlideRecord('the table you are looking at') gr.get('sys_id of the record you are looking at') for(var eachVariable in gr.inputs){ gs.info(eachVariable + ' : ' + gr.inputs[eachVariable]) }
If you run this in a background script you’ll see precisely which variables exist and what their values are.

Part One: ServiceNow Hyperautomation – Process Optimisation
Read More

Introduction to ServiceNow Hyperautomation
Read More

JDS and the GO Foundation
Read More

Mastering Modal Dialog Boxes
Read More

Virtual Agent: Understanding The Limitations Of LITE
Read More

ServiceNow & ReactJS
Like any enterprise platform, ServiceNow has a complex relationship with its underlying architecture. Originally, ServiceNow was built on Java ...
Read More

Working With ACLs In ServiceNow
Read More

How ServiceNow’s ‘Virtual Agent’ can assist your organisation: Part 4
Read More

How ServiceNow’s ‘Virtual Agent’ can assist your organisation: Part 3
Read More

How ServiceNow’s ‘Virtual Agent’ can assist your organisation: Part 2
Read More

How ServiceNow’s ‘Virtual Agent’ can assist your organisation: Part 1
Read More

ServiceNow Upgrade Process
Read More

Modifying Service Portal Widgets On-The-Fly
Read More

Custom Glide Modal Dialog Boxes in ServiceNow
Read More

Manipulating Service Portal Widgets Without Modifying Them
Read More

Virtual Agent Is Your Friend
Read More

Using Common Functions in the Service Catalog
Read More

Glide Variables
Read More

Asset Management in ServiceNow
Read More

Fast-track ServiceNow upgrades with Automated Testing Framework (ATF)
Read More

Filtered Reference Fields in ServiceNow
Read More

Straight-Through Processing with ServiceNow
Read More