Variable Helper

Variable Helper

Working with variables in ServiceNow is no fun sometimes, especially Multi Row Variable Sets. For that reason I created a helper Script Include to make my life easier.

There are 4 parameters that can be passed as an object when instantiating the Script Include or after with setter functions. All default to false;

  • useDisplayValue: This will return the display value of all variables instead of value
  • expandRef : This will return any reference field as an object.
  • useLabel : Variable/Field Labels will be used instead of name.
  • debug : Enable additional logging

Example

Script

Related Posts