Query Builder
Build ServiceNow list filters as readable pills from the slash palette: press Tab on a table command, pick fields and values, use ServiceNow shorthand like *text, combine with or and new criteria, add switches, and edit the current list in place.
Last updated: October 26, 2026
The Query Builder turns a slash command into a list filter you can read. Instead of typing an encoded query by hand, you pick a field, type a value, and get a pill such as Name contains vpn. The encoded query is built for you and stays visible at the bottom, so nothing is hidden.
Opening the builder
Type a slash command that opens a list, such as /br, /incident or any custom command that points to a list, and press Tab. A small Filters chip in the input shows when a command supports it.
The builder replaces the input with a pill line. The command sits on the left as a green chip, and the fields of the table are listed below with their type and technical name.
Type part of a field name to narrow the list. Exact matches rank first, then labels that start with what you typed, then technical names.
Adding a filter
- Type a field name and press Tab, or press Space after the complete label (
active). - Type the value. Text fields default to starts with.
- Press Tab or Enter to accept the pill.
The row under the input always shows the filter you are about to accept, for example Short description starts with vpn, so you see the operator before you commit.
ServiceNow shorthand
The value prefix picks the operator, the same way the list search box does:
| You type | Operator |
|---|---|
vpn | starts with |
*vpn | contains |
=vpn | is |
%vpn | ends with |
!=vpn | is not |
!*vpn | does not contain |
>=5, <=5, >, < | number and date comparisons |
With nothing typed, the list offers is empty and is not empty.
A trailing operator on the field name picks the field and the operator in one go: nam* gives Name contains, desc= gives Description is.
Commands with their own search field, like /br, treat *vpn as a search in that field. For a table without one, *vpn lists every text field so you can choose where to search.
Choices, booleans and references
Choice and boolean fields list their values. Reference fields search the referenced table as you type and show the record names. Pick one, or paste a sys_id. For user fields, Me is always offered.
Editing pills
- Click a pill to edit it. The value comes back in the box in its shorthand form, selected, so you can type over it.
- Backspace on an empty box reopens the last pill for editing. Shift+Backspace removes it.
- The × on a pill removes it. Esc cancels an edit and puts the original back.
Or, and new criteria
ServiceNow has two kinds of OR, and the builder supports both.
Small or joins a filter with the one before it. Pick a second value for a field that already has an is pill and the two merge into one pill, such as Priority is Critical or High. For any other filter, press Shift+Tab instead of Tab, or type or followed by a space before adding it. The small and / or label between pills toggles the join when you click it.
New criteria starts a second, independent set of filters that is ORed with the first as a whole, the same as "New Criteria" in the condition builder. Type OR followed by a space, press Shift+Enter, or type ||. A divider marks where the new set begins.
Switches
Type - to list the switches, including your custom ones and time filters like -u5d. Accept one and it becomes a pill. Switches typed as text, such as /br -a -ut, open as pills too.
Preview, open, and the encoded query
- Preview (or the right arrow on an empty box) shows the first results inside the palette. Press 1 to 9 to open a row.
- Open list (or Enter on an empty box) opens the list. Hold Cmd or Ctrl to open it in a new tab.
- Edit as text switches to the plain encoded query in the input. Press Tab to come back to pills. Nothing is lost in either direction.
The QUERY line at the bottom shows the encoded query at all times. Parts of a query the builder cannot show, such as dot-walked fields, IN lists, date ranges or scripts, are kept as locked pills and written back exactly as they were.
Editing the current list
On a list, open the palette with an empty input and press the left arrow, or click the Current list chip. The list's own filter opens as pills.
Apply writes the query back to the list without reloading the page. Sorting and grouping stay as they were.
The same builder is one click away from the list query editor: double-click the breadcrumb and choose Build.
Keyboard summary
| Key | Action |
|---|---|
| Tab | open the builder on a list command, accept the highlighted suggestion |
| Space | accept an exact match (whole field label, switch key, choice) |
| Enter | accept, or open the list when nothing is being typed |
| Shift+Tab | accept joined with or |
Shift+Enter, OR , || | new criteria |
| Backspace | edit the last pill |
| Shift+Backspace | remove the last pill |
| Left arrow | edit the current list |
| Right arrow | preview results |
| 1 to 9 | open a preview row |
| Esc | cancel the current edit, then close |