sabell2012
Mega Sage
Mega Sage

NOTE: MY POSTINGS REFLECT MY OWN VIEWS AND DO NOT NECESSARILY REPRESENT THE VIEWS OF MY EMPLOYER, ACCENTURE.

 

DIFFICULTY LEVEL:    INTERMEDIATE
Assumes good intermediate level knowledge and/or familiarity of Scripting in ServiceNow.


In the past I have used the ServiceNow Share to post out code snippets. However, over time those have faded away and been dropped from that repository. Here I have collected together into a Script Include some of my more favorite functions, from my articles, that I have shared with the community.

 

I have built these using a function library template so that you can just add the Script Include to your instance (upload as XML). Since this is a function library you will not need to "new" it.

 

These have all been tested on my PDI and function with an OOB instance.

 

Instructions for use:

 

To load it up into your instance do the following:

 

  1. Download the sys_script_include_UsefulUtilities.xml file attached to this article.
  2. In your instance Navigate to System Definition -> Script Includes. A list view of all Script Includes will be displayed.
  3. Right-Click next to the name field to bring up the context menu.
  4. Click the Import XML link at the bottom of the context menu.
  5. Click the Choose File button.
  6. Navigate to your download folder and pick the file labeled: sys_script_include_UsefulUtilities.xml and click the OK button. You will be returned to the import form.
  7. Click the Upload button. The new Script Include will be added to your Script Include list and is then ready for use.

 

I will continue to update this library, in the future, as new functionality presents itself.

 

NOTE: Download and use this software at your own risk. These are simply presented as an example on how to utilize ServiceNow utilities in a Script Include function library.

 

Enjoy!

Steven Bell.

 

If you find this article helps you, don't forget to log in and mark it as "Helpful"!

 

sabell2012_1-1696102033098.png