Slash Switches
Learn how slash switches modify command behavior in SN Utils, including filters, URL params, ordering, and time-based queries.
Last updated: February 26, 2026
Last updated: February 26, 2026
Slash switches are small flags you add after a command to change what it does.
Example:
/incident vpn -s -p
/incident = base commandvpn = search term-s and -p = switches that modify behaviorMost switches fall into one of these groups:
| Type | What It Does | Example |
|---|---|---|
| Filter switch | Adds a filter condition | -a for active records |
| URL switch | Adds URL params | -p to keep filters pinned |
| Sort switch | Adds ordering | -ud for updated desc |
| Action switch | Opens related targets | -t for table definition |
In below example /p is a command for the sys_properties table.
| Command | Result |
|---|---|
/p -n | Open a new record |
/p -t | Open table definition |
/p -r | Open a random record |
/incident vpn -s | Search in current scope |
/task -p | Keep filter pinned in list |
Time switches let you query records by age.
Syntax:
-<type><number><unit>
Types:
-u updated in the last...-c created in the last...-uc updated or created in the last...-um updated by me in the last...Units:
s secondsm minutesh hoursd daysw weeksM monthsq quartersy yearsExamples:
| Command | Result |
|---|---|
/incident -u5d | Updated in last 5 days |
/task -c3h | Created in last 3 hours |
/incident -uc15m | Updated or created in last 15 minutes |
/sys_script -um1w | Updated by me in last week |
You can chain switches in one command:
/br myRule -u2d -s -p
That means:
myRuleYou can use switches without a table command by starting with /-. The switch applies to the current list or form table.
| Command | Result |
|---|---|
/-a | Filter current list to active records |
/-c3h | Filter current list to created in last 3 hours |
/-a -c1d | Active records created in the last day |
Use the -field:value syntax to quickly filter any field by "contains" without defining a custom switch. This works both headless and with table commands.
| Command | Result |
|---|---|
/-name:david | Current list where name contains "david" |
/sys_user -name:david -a | Active users where name contains "david" |
/incident -short_description:vpn -c1d | Incidents with "vpn" in short description, created in last day |
The field name must match the actual ServiceNow column name (e.g. short_description, not "Short description").
Need custom behavior? You can define your own switches in the Switches tab on the Manage page (gear icon in the popup header, or /manage).
For the legacy JSON format, you can also edit switches under Settings > Advanced on the Manage page. See Custom Commands for details on the legacy JSON editing workflow.
If you are using the legacy JSON format under Settings > Advanced, here are some example switches:
{
"s": {
"description": "Current Scope",
"value": "^sys_scope=javascript:gs.getCurrentApplicationId()",
"type": "encodedquerypart"
},
"p": {
"description": "Filter Pinned",
"value": "&sysparm_filter_pinned=true",
"type": "querypart"
},
"t": {
"description": "View Table Structure",
"value": "sys_db_object.do?sys_id=$0&sysparm_refkey=name",
"type": "link"
},
"pi": {
"description": "Pop In - Open in full UI",
"value": "/nav_to.do?uri=",
"type": "prepend"
}
}