Related List Condition Helper
Build RLQUERY filter conditions visually using the Related List Condition Helper, a Pro feature for constructing related list queries on ServiceNow lists and forms.
Last updated: April 1, 2026
Last updated: April 1, 2026
The Related List Condition Helper lets you build RLQUERY filter conditions visually — no more hand-crafting encoded query strings. It discovers all reference relationships for a table, auto-detects many-to-many junction tables, and generates the correct RLQUERY syntax ready to apply or copy.
The helper is available from the Technical Names popover on both forms and lists. When Technical Names is enabled (/tn), click the cog icon on any field label pill to open the popover, then select Related List Condition Helper.

This opens the full helper modal where you can select a target table, configure conditions, and preview the generated RLQUERY:

When you open the helper, it:
PAUtils().getTableAncestors() to discover all reference fields, including inherited onessys_dictionary for all reference fields and sys_m2m for many-to-many definitionssys_m2m or has exactly two reference fields), the M2M checkbox is pre-checkedThe top section lists all tables that the source table references. Each entry shows the target table name, the reference field used, and an m2m badge if the relationship is many-to-many.
Click a target to select it. If there are more than five targets, a search filter appears.
Choose the count operator:
| Operator | RLQUERY Output | Meaning |
|---|---|---|
| has at least | >=1 | Target list has 1 or more matching records |
| has no | =0 | Target list has zero matching records |
| has exactly | =N | Target list has exactly N matching records |
| has at most | <=N | Target list has at most N matching records |
Check this box when the source table is a junction table (e.g., sys_security_acl_role linking ACLs to roles). The helper auto-detects this when possible.
Optionally add encoded query conditions on the source table. When opened from a form field, the current field value is pre-filled. When opened from a list, the active list filter is included.
The preview section shows the generated RLQUERY string in real-time as you adjust settings. For example:
RLQUERYsys_security_acl_role.sys_security_acl,>=1,m2m^sys_user_role=260c203a870033000e56d61e36cb0bbc^ENDRLQUERY
| Button | Action |
|---|---|
| Open Target List with Filter | Opens the target table list in a new tab with the RLQUERY applied as a filter |
| Preview Count | Runs a Stats API call to count how many records on the target table match the RLQUERY |
| Copy Query | Copies the RLQUERY string to the clipboard for use in scripts, condition builders, or URL parameters |
| Cancel | Closes the helper |