Reference Qualifiers & Field Security
Reference Qualifiers filter which records appear in reference field pickers. Field-level ACLs control which users can see or write specific fields. Together, they enforce data quality and security at the field level.
Reference Qualifiers
When a Reference field points to a table (like assigned_to pointing to sys_user),
by default the picker shows every active record in that table. For a table with 10,000 users,
that's unwieldy. A Reference Qualifier filters what appears
in the picker, narrowing the options to only relevant records.
For example: the Assignment Group field on Incident could be qualified to only show groups with the "Assignment Group" type flag set. Without the qualifier, every group in the instance appears — including executive groups, project teams, and access control groups.
Three Types of Reference Qualifiers
| Type | How it works | Best for |
|---|---|---|
| Static | Fixed encoded query that never changes. Set in the "Reference qual" field on the dictionary entry. Example: active=true^type=assignment |
Simple filters that don't depend on context |
| Dynamic | Encoded query with JavaScript-like variables that resolve at run time. Can use javascript: prefix to call a function. |
Filters based on current user, form values, or context |
| Scripted | Full JavaScript function (in "Reference qual script" field) returning an encoded query string or GlideRecord. Most flexible. | Complex logic — multiple conditions, external lookups, user role-based filtering |
Field-Level ACLs
Access Control Lists (ACLs) in ServiceNow enforce both table-level and field-level security. A field-level ACL specifies who can read or write a specific field on a specific table.
Field ACLs work as an additional layer on top of table ACLs. A user must have table-read access to even open a record, and then field-read ACLs determine which specific fields they can see. Similarly, table-write access allows saving, but field-write ACLs control which fields they can modify.
Read vs. Write Field ACLs
- Read ACL on a field — if the user fails this ACL, the field is hidden/blank in forms and API responses. The Table API response simply omits fields the requesting user can't read.
- Write ACL on a field — if the user fails this ACL, the field appears read-only on the form. API attempts to write it are silently ignored (the field is not updated).
Row-Level Access Control
Beyond field-level ACLs, ServiceNow also supports row-level access control through the ACL framework. A table read ACL can include a condition script that evaluates whether the current user should see this specific record.
For example: an ACL on incident with a condition script that returns
current.caller_id == gs.getUserID() means users can
only see incidents they reported themselves. Without this ACL, they'd see all incidents.
- Row-level ACLs use condition scripts that return true (allow) or false (deny)
- They are evaluated for every record returned by a query — this can be slow on large result sets
- GlideRecord queries do NOT automatically skip rows blocked by ACLs when running in scripts — use
gr.canRead()to check manually
Principal Class Filtering for CMDB
Principal Class Filtering is a CMDB-specific mechanism for controlling which CI class can be selected in a Reference field that points to cmdb_ci or any of its child tables.
Without Principal Class Filtering, a Reference field to cmdb_ci allows selecting
any CI of any class — a server, a database, an application service, a network device.
For a Change Request's "Affected CI" field, you might want to restrict it to only
hardware CIs (cmdb_ci_hardware) or only servers (cmdb_ci_server).
To configure Principal Class Filtering:
- Navigate to System Definition → Dictionary
- Find the Reference field entry (e.g.,
change_request.cmdb_ci) - Open the Reference Specification related list at the bottom
- Click New and enter the CI class name you want to allow (e.g.,
cmdb_ci_hardware) - You can add multiple classes — users can pick CIs from any of the listed classes
sys_class_name matches one of the allowed classes (or their children).
If you allow cmdb_ci_hardware, the picker shows all hardware CIs including
cmdb_ci_computer and cmdb_ci_server because those extend it.
The filtering respects the inheritance hierarchy.
Field Encryption
For sensitive data like SSNs, credit card numbers, or passwords, ServiceNow supports field-level encryption. When enabled on a field, values are encrypted at rest in the database and only decrypted for users with the appropriate role.
- Configured via the Encrypted checkbox on the dictionary entry
- The snc_internal or a custom role is required to view decrypted values
- Encrypted fields cannot be used as coalesce fields in Import Sets (the encrypted value doesn't match a plain-text comparison)
- Reports and list views show masked values for users without decrypt access
Common Exam Traps — Reference Qualifiers & Field Security
- Reference Qualifiers filter the UI picker only — they don't block API or script writes
- Three qualifier types: Static (fixed query), Dynamic (context variables), Scripted (JavaScript function)
- Field read ACL failure = field omitted from API response silently (no error)
- Field write ACL failure = write silently ignored in API (no error)
- Principal Class Filtering restricts which CI class can be selected in CMDB Reference fields — configured via Reference Specification related list
- Principal Class Filtering respects inheritance — allowing
cmdb_ci_hardwarealso allows all classes that extend it - Encrypted fields cannot be used as coalesce fields in imports
Practice Questions
4 questions · Select an answer to see the explanation immediately.
A REST API integration sets the "assignment_group" field on an Incident to a sys_id of a group that is filtered out by the Reference Qualifier on that field. What happens?
B is correct. Reference Qualifiers are purely a UI-side filter — they narrow what appears in the reference field picker dialog for users interacting with forms. They have zero enforcement power over scripts, REST API calls, or import sets. Any valid sys_id can be written to a reference field via API regardless of Reference Qualifier configuration. For server-side enforcement, you need a Data Policy or a Before Business Rule that validates the value programmatically.