Tag: queries
11 results
-
Find Filthy Inefficient Single-Record Queries FAST
A script that scans your instance for single-record GlideRecord queries missing setLimit(1) - the most common performance anti-pattern in ServiceNow.
-
How to Identify Duplicate Records by Multiple Fields in ServiceNow
Finding duplicate records when the "duplicate" is defined by a combination of multiple fields, not just one.
-
Using .addJoinQuery() & How to Query Records with Attachments in ServiceNow
Use addJoinQuery() to find records with attachments in ServiceNow. No loops, no extra queries - just one clean join.
-
Broken Queries & Query Business Rules in ServiceNow
When to use Query Business Rules vs. ACLs for security and performance, and why your query rules might be silently breaking things.
-
Powerful Scripted Text Search in ServiceNow
How to perform IR_AND, IR_OR, and other text search operations from GlideRecord scripts in ServiceNow.
-
GlideRecord Pagination - Page through your GlideRecord query
A Script Include for paging through large GlideRecord queries in manageable chunks. Handy for REST APIs, UIs, and batch operations.
-
SN101: Boolean logic and ServiceNow's Condition Builder
A deep dive into boolean logic (AND/OR) and how it maps to ServiceNow's Condition Builder. Part of the SN101 series for newcomers.
-
Locate any record in any table, by sys_id in ServiceNow
A script that searches every table in your instance to find which record a mystery sys_id belongs to.
-
Detecting Duplicate Records with GlideAggregate
Using GlideAggregate to detect and report on duplicate records across any table in ServiceNow.
Tools
-
Detect Duplicates (Single or Multi-Field)
Identify duplicate records in ServiceNow by one or more fields using a simple script.
-
Paginated GlideRecord Utility
Page through GlideRecords to handle very large queries, build content pages, etc. This utility allows you to specify a page size (in number of records) and get the results of a query of ANY size, in chunks of that size.