Skip to content

Instantly share code, notes, and snippets.

View harrisitservices's full-sized avatar

harrisitservices

View GitHub Profile
@harrisitservices
harrisitservices / gist:97e21fdddb9a982fc33791831ce898b4
Last active July 28, 2016 15:56
Here are some things you can do with Gists in GistBox.
We couldn’t find that file to show.
@harrisitservices
harrisitservices / sn_search_field_for_duplicate_values.md
Last active February 6, 2018 18:57
ServiceNow - Search Field for Duplicate Values

Search Field for Duplicate Values

This script uses GlideAggregate to search a field on a table for duplicate values. It then returns the value with duplicates in an array.

var xx = new GlideAggregate('table');  
xx.addAggregate('COUNT', 'field');  
xx.addHaving('COUNT', 'field', '>', '1');  
xx.query();  
var answer = []; 
@harrisitservices
harrisitservices / sn_export_update_sets_to_midserver.md
Last active February 2, 2021 22:13
ServiceNow: Exporting Update Sets to the Midserver

ServiceNow: Exporting Update Sets to the MidServer

This gist includes a script include and background script that can be used to export files from ServiceNow to a connected Midserver in many different formats. I took the code provided here and tweaked it so that I could do what I wanted to do.

Components

  • MidServer Script Include
var ExportToMidserver = Class.create();