SN Utils search slash commands including Sys ID search, code search with GraphQL mode that honors Code Search Groups and custom tables, graphical field picker, two-pane results with detail mode and field-level filtering, Active/Inactive chips, and long-string collapse.
Last updated: April 19, 2026
Beyond table searches, SN Utils provides specialized search commands.
Sys ID Search
Often you have a Sys ID but don't know the table. This command finds it:
/b9377c460b0131109dae8a8db777b295
The search is optimized to start with common base tables (sys_metadata, users, task) for faster results.
Usage options:
/<sys_id> - Direct sys_id
/sysid <sys_id> - Explicit command
/"sys_id" - Sys ID in quotes
This command requires admin role.
Code Search
Search code across your instance using the built-in code search API:
/code changeutils
Code search can also be triggered via:
Selected text and extension context menu
Monaco editor context menu
The code search page supports two modes: Classic (using the ServiceNow Code Search API) and GraphQL (using the Now Platform GraphQL API).
Code Search for Current Table
Use /codecurrent to search code filtered to the table you're currently viewing:
/codecurrent getValue
On a sys_script_include form, this searches for "getValue" in the sys_script_include table only.
Classic Mode
Classic mode uses the built-in ServiceNow Code Search API. It relies on Code Search Groups configured on your instance, and searches the tables defined in the selected group.
Classic mode now supports the table: syntax — if you include table:sys_script in your query, the search is limited to that table within your search group. If the table is not part of the group, a message is shown. field: filtering is only available in GraphQL mode.
The last-used search group is remembered per instance, so you don't need to re-select your preferred group every session.
Custom Code Search Commands
You can create custom slash commands that open Code Search with pre-filled filters. See Custom Code Search Commands for details.
GraphQL Mode Pro
GraphQL mode provides a faster, more powerful search experience. It uses the Now Platform GraphQL API to search across a curated index of ~450 code-related tables and automatically layers on top the tables and fields from your selected Code Search Group (sn_codesearch_search_group). Custom tables (including u_* and x_*) and admin-configured search_fields / additional_filter from sn_codesearch_table are honored out of the box, so GraphQL mode is a strict superset of Classic for your configured scope.
Search Syntax
GraphQL mode supports advanced search syntax:
Syntax
Description
Example
word1 word2
Match all words (AND). Records must contain every word in any searchable field.
GlideRecord query
"exact phrase"
Match an exact phrase as a single term. Wrap in double quotes.
"var gr = new"
table:name
Restrict search to tables matching the name. Partial match on table name and label.
This searches only tables matching "sys_script", only in the "script" field, for records containing the phrase "GlideRecord" and the word "addQuery".
Options
Option
Description
Active only
Restrict to records where active = true (for tables that have an active field). Off by default so you see the full picture; every record header shows an Active or Inactive chip so you can tell them apart at a glance. An additional_filter configured on the group or as a local override takes precedence over this auto-added condition.
Extended search
Optional. Discovers additional tables from sys_dictionary beyond the curated list. Usually not needed — your selected Code Search Group and any local overrides are already layered in. Enable this only when you want a wider auto-discovery sweep.
Show long strings
Controls the inline collapse of long non-whitespace runs (base64 payloads, JWTs, data URLs, minified JS chunks). When off, runs of 80+ characters without whitespace render as a ⋯ 2,431 chars ⋯ pill you can click to expand. A yellow match pill on the collapsed blob means your term was found inside it, so hits are never hidden silently.
Results per table
Limit the number of matching records returned per table (10, 25, 50, 100, or 250). Higher limits slow down per-batch responses.
Updated date range
Filter results by last updated date. Use presets (7 days, 30 days, 90 days, 1 year) or a custom range.
Keyboard Shortcuts
Shortcut
Action
Enter
Execute search
Esc
Cancel a running search
Cmd/Ctrl + K
Focus the search input
How It Works
Uses the ServiceNow GraphQL API for parallel queries across hundreds of tables in batched requests.
A curated field index of ~450 code-related tables is pre-loaded, covering script, condition, HTML, XML, JSON, and CSS fields.
Your selected Code Search Group (including custom tables like u_* / x_*) is layered on top automatically, using the admin-configured search_fields and additional_filter from sn_codesearch_table. Fields configured on the group are used verbatim and are not truncated by the default 15-field-per-table cap or dropped by short-string heuristics, because the admin explicitly named them.
Results are sorted by relevance — tables with the most matching records appear first.
Tables that return insufficient access or ValidationError from GraphQL are cached as inaccessible and skipped on future searches for 7 days — this is expected for tables the current user can't read or that aren't exposed to GraphQL. You can view and retry them via the Review Tables button.
Failed batches are automatically split and retried with smaller payloads, so a single problematic table won't break your entire search.
Tables are queried in parallel batches (50 at a time) so first results appear while later batches are still in flight.
The field index is cached locally for 30 days. Use Refresh to rebuild it.
Scope Precedence
When GraphQL mode decides which fields to search in a given table, the following precedence applies (highest wins):
Local override — fields you configured in the Review Tables editor on this device.
Group — the search_fields configured on the sn_codesearch_table row for the selected Code Search Group.
Curated — the default fields from SN Utils's codesearch.json curated list.
Discovered — fields discovered via sys_dictionary when Extended search is enabled (subject to length and type heuristics).
For example, if your group defines search_fields=name,script,condition on sys_script_include, those three fields are searched verbatim — regardless of the curated defaults — and any additional_filter (for example active=true) on the same row is prepended to every GraphQL query for that table.
Review Tables
Click Review Tables in the field index bar (or the Scope: chip next to the field-index status) to inspect and customize the current search scope:
See which tables were searched, their fields, and the generated GraphQL queries. Each row shows a source badge — Curated, Group, Override, or Discovered — so you can see why a table is in scope and which configuration won.
View and retry inaccessible tables — tables that returned insufficient access or a ValidationError and are temporarily excluded. Click Retry to forget the cache and re-try them on your next search.
Add custom table — pin any table on your instance (with autocomplete from sys_db_object), specify the comma-separated fields to search, and an optional additional_filter encoded query. Useful for custom tables that are not part of a Code Search Group.
Override fields — for any table already in scope, click Override fields to edit its field list locally. This bypasses the 15-field cap and short-string filter, so every field you list is searched verbatim.
Reset — remove a local override and fall back to the group / curated defaults for that table.
Local overrides are stored per instance and carried across machines by the existing SN Utils backup/sync flow.
The Scope: chip in the field-index bar summarizes the active group and the number of local overrides, for example Scope: 12 from "My Code Search Group" + 3 overrides.
Graphical Field Picker
Instead of hand-typing a comma-separated field list, the override editor can fetch the columns of any table directly from the instance:
Type or paste a table name — a Suggest fields button appears next to the input, and the picker also auto-loads when you tab out of the field.
Under the hood the picker calls /api/now/ui/meta/{table} (using your current session cookie), so it sees exactly the columns and types you have access to, including extended-table and custom columns.
Each column is shown as a checkbox row with its technical name, label, and a type chip. Columns that are typically worth searching (string, html, script, script_plain, script_server, script_client, json, xml, css, translated_text, conditions, url, email, and similar) are highlighted as string-like and preselected as the default visible set. A Show all types toggle reveals every other column (reference, integer, glide_date, etc.) if you need them.
Select string-like one-click preset checks every searchable column at once. Clear clears the selection.
A Filter fields input narrows the grid by name or label. Checked items stay visible even if they don't match the filter, so you never "lose" a selection while browsing.
The checkbox grid and the comma-separated input are two-way bound — typing into the CSV updates the checkboxes, and checking a box updates the CSV. Manual entries that don't appear in ui/meta (for example, a legacy renamed column) are preserved at the front of the CSV.
Results are cached in memory for the session, so reopening the picker for the same table is instant.
Parent Record Resolution
Some tables store scripts that "live inside" a parent artifact — sys_variable_value, for example, holds Flow Designer action input values, catalog-variable defaults, and record-producer values. A bare sys_variable_value match doesn't tell you which artifact the script belongs to, only that some variable somewhere has matching content.
Each sys_variable_value hit gets a small Used by chip showing the immediate parent table name (from the document column) and the parent's short sys_id. The magic-wand button on the chip walks the parent chain on click — for a Flow Designer match this means stepping sys_hub_action_input → sys_hub_step_instance → sys_hub_action_type_base so the chip lands on the action you actually think of, not the intermediate plumbing record. The full hop trail (each table, the field that connected it to the next, and any error on a broken hop) lives in the link's tooltip, so you can see exactly how the script is wired into the artifact.
The chain is driven by two layers:
Curated mapping. Common Flow Designer hops ship in js/codesearch.json under _parentChains (action input → step instance → action type, trigger instance → flow, subflow input/output → flow, etc.). These are walked first.
Dynamic discovery. When the chip hits a table that isn't in the curated map, the walker queries sys_dictionary for the table's reference columns, picks the most "parent-like" one (flow, action, step, parent, instance, …), and caches the result per-instance in IndexedDB. The next click on a chip pointing at the same intermediate table is free.
The walker is bounded (max 6 hops) and self-aware (it won't revisit a table it already passed through), so a misconfigured chain can't lock the wand spinning. When the parent record is gone (deleted or no read access) the chip styles itself as inactive and surfaces the reason in the tooltip; the original immediate-parent link stays clickable so you can still navigate to the form view.
Results Layout
Results render in a two-pane view with a sticky Tables sidebar on the left and the active table's records on the right:
Click any table in the sidebar to focus just its hits — the other tables hide.
Click All tables at the top of the sidebar to return to the full list.
Tables are sorted by match count; the hit count is shown next to each entry.
A table filter appears above the list when there are more than 8 tables, so you can narrow a long list like email or sys_script.
While a table is focused, a Filter records box appears above the right pane. Type to hide records in that table whose content doesn't contain the term (useful for zeroing in on a specific script include name inside a large hit count).
Drag the divider on the right edge of the sidebar to resize it; the width is remembered locally.
Keyboard shortcuts: j / k to step through tables, Esc to clear the active field filter first and then fall back to All tables.
Only the search bar stays sticky while you scroll — the rest of the options bar hides so you keep full vertical space for results.
On narrow viewports (< 900px wide) the sidebar collapses above the results.
This layout applies to both Classic and GraphQL modes.
Sidebar Detail Mode & Field-level Filtering
Toggle Details at the top of the Tables sidebar to switch the list into a richer layout:
The technical table name is shown below its human label in a monospace font.
Each table expands into small field pills listing every field that had at least one hit, with per-field hit counts.
Click any field pill to filter within that table to just records that match in that field — useful for isolating, say, script hits versus description hits on sys_script_include. The active filter shows up as a Field: script × chip next to the Filter records box.
Clicking a pill from the All tables view auto-focuses the owning table first.
Press Esc to clear the field filter; press Esc again to return to All tables.
Field-type Badges
Every record shows compact colored pills in its header summarizing which kinds of fields matched, so you can skim a long list and tell code hits apart from descriptive text without expanding each card:
The same chip is shown next to the Field: heading when you expand a record, so you can see exactly which field matched at what line. Types are resolved from the curated codesearch.json when available, with a name-based heuristic fallback so custom tables and ad-hoc fields still get sensible badges.
Help
Click the Help button in the field index bar for a quick reference of all search syntax, options, and keyboard shortcuts directly on the page.
Unified Menu Search
When slash commands find 3 or fewer matches, it searches the unified navigation (all Next Experience menus).
SN Utils searches the entire menu hierarchy, and word order doesn't matter.
The search also matches against target URLs:
Global Search
When no specific command matches, pressing Enter performs an instance search:
Custom Searches
Some commands search specific types and open results directly:
Command
Action
/spw
Search portal widgets, open in widget editor
/uibe
Search UI Builder Experiences, open in UI Builder
You can create your own custom search commands - see Custom Commands.