ServiceNow Dot-Walking Explained
What Is Dot-Walking?
Dot-walking in ServiceNow is the practice of following reference fields across tables to read, display or filter by fields on related records. When a table holds a reference to another table, you write the path as table.field.relatedfield, with a dot separating each level of the relationship, and the platform resolves the chain for you. The sections below cover where dot-walking is used, what it costs at query time, where its output misleads, and when a query is the better tool.
For example, an incident record has a Caller field that references a user record. The user record has fields like name, email, department. Instead of being limited to just the user ID in the incident, you can dot-walk to access the caller’s email or department directly. In a report or query, you might filter incidents by the caller’s department or display the caller’s full name and email.
Where Dot-Walking Is Used
Dot-walking appears in multiple places in ServiceNow. In list views, you can configure columns that display related data: the incident’s caller name and email, the incident’s assigned group’s manager. In reports, you can filter and group by related data: show incidents grouped by the caller’s department, count incidents by the assigned group’s business unit. In queries and scripts, you can read related data: get the change’s requested-by user’s manager and send them a notification.
In UI policies and business rules, dot-walking lets you reference related tables without writing queries. For example, you might have a UI policy that says “if the incident’s caller’s department is Finance, make this field mandatory.” In Service Portal widgets, you can display related data: show the user’s open incidents on their profile.
How Dot-Walking Works Behind the Scenes
Dot-walking is convenient syntax, but it causes database queries. When you reference caller.email, ServiceNow queries the incident table, then queries the user table using the caller foreign key to get the email. In a list with one hundred incidents, displaying caller.email runs one hundred additional queries. This is why dot-walking can hurt performance in lists and reports with large datasets.
ServiceNow caches some dot-walked data to reduce query overhead, but this cache is not perfect. A list displaying caller.email on ten thousand incidents will be noticeably slower than a list showing just the caller ID. Context matters: a dashboard showing fifty incidents with dot-walked data is fine; a report running on millions of records might need optimisation.
Limitations and Common Pitfalls
Dot-walking only works in one direction: from a table with the foreign key to the table being referenced. An incident has a reference to a user (caller), so you can dot-walk from incident to user fields. But you cannot dot-walk the reverse—from a user table to see all their incident field values—without using a query or relationship field.
Dot-walking can only traverse relationships that are defined as foreign keys. If you need to cross tables through a many-to-many relationship or a custom relationship, dot-walking will not work; you need a query. Additionally, dot-walking shows the current state of the related record. If you dot-walk to a field and that related record is later deleted, the dot-walked field becomes empty.
Dot-Walking in Reports and Dashboards
In report builders, dot-walking is essential. You add a field from a related table by dot-walking the relationship. Your report might show incidents with columns for caller.name, caller.email, and assigned_to.department. The report builder handles the dot-walking queries automatically. However, reports with many dot-walked fields across large datasets can be slow; cache your reports or segment the data if performance lags.
Performance Implications
Dot-walking has real performance costs. Each dot-walked reference requires a database lookup. In a list showing one hundred incidents with caller.email dot-walked, ServiceNow makes one hundred additional queries to the user table. With caching, this is partially mitigated, but the overhead is real. Large reports displaying multiple dot-walked fields across large datasets can be very slow. Consider pagination, filtering to reduce row count, or caching if performance lags. For critical performance-sensitive operations, use proper queries or dedicated batch processes instead of dot-walking in reports.
Dot-Walking in Scripts
In GlideRecord scripts, dot-walking looks like this: var caller_email = incident_record.caller.email. This reads the caller user record and retrieves the email field. You can chain multiple dots: incident_record.caller.manager.email reads the incident’s caller’s manager’s email. Each additional dot is another relationship traversal. Scripts should limit deep dot-walking because each relationship requires a database lookup; nesting three or more levels deep is usually a sign you should restructure your query.
Who decides where a dot-walk belongs
Dot-walking is written by report builders, list designers and developers, and each of them faces a different trade-off. A list designer who adds a related field to a column is choosing a query for every row on every page load. A report author who groups by a related field is choosing a join across a large table. A developer who reads a related value inside a script is choosing a lookup that runs once per record in a loop. The question to settle first is therefore not whether a path like the caller’s manager’s email is convenient, but how many rows will evaluate it, how often, and whether the result must be exact at the moment it is read.
A simple test sorts most cases. If the value is shown to one person on one record, dot-walking is generally fine. If it is evaluated for many records in one pass, such as in a scheduled job, a bulk report or a list of thousands of rows, the path needs a deliberate query or a stored copy of the value. The record access pattern that a script uses for a single lookup is different from the one it should use across a loop, and the difference matters more than the syntax.
Matching the access pattern to the place it runs
| Where the path is used | Usual safe depth | What to check before shipping | Safer alternative when it fails |
|---|---|---|---|
| Form field display | One or two levels | The related table is readable by the typical user | A reference field with a display value stored on the parent |
| List column on a large table | One level | Page size and sort order on the walked field | A filtered view, or a denormalized field kept current by a business rule |
| Report grouping or filter | One or two levels | Run time with production volume, not test data | A reporting table that holds the joined values |
| Business rule or script loop | One level, rarely two | Whether the walk runs once per record in a batch | A single query that collects identifiers, then a second query for the related set |
| Access rule or condition | Avoid where possible | What happens when the related record is hidden from the evaluating user | A stored flag written when the relationship changes |
The last row deserves more attention than it often receives. When a condition depends on a value reached by a walk, the answer can change depending on who is evaluating it, because access rules on the related table apply during the walk. A field that looks populated to an administrator can read as empty for a standard user, and the condition then behaves differently for each of them.
A review checklist before a walk reaches production
- Write down how many records the path will touch in the largest realistic run, and how often that run happens.
- Identify each reference in the path and confirm whether the user who triggers the path can read the table at the end of it.
- Decide what the reader should see when the end of the path is empty, and set that behavior explicitly rather than accepting a blank cell.
- Run the report or list as an ordinary user, not an administrator, and compare the row counts with an administrator’s view.
- Record the run time with production-sized data, then repeat it after the next large import.
- If the walk sits in a loop, replace it with one query that collects the needed identifiers, and read the related values from a set held in memory.
Failures that look like correct output
Dot-walking rarely throws an error when it goes wrong. The common failures are quiet. A walked field returns nothing because the referenced record was deleted or deactivated, and a report total drops without any message. A walked value shows a stale copy because a list was cached before a change, which is confusing when two people see different results. An access rule hides the related table from one group, and that group receives reports with a column that is always blank. Each of these needs a test that compares the output with a known set of records, not just a check that the page loads.
Chained walks create a second kind of failure. A path that reads a manager of a caller of an assigned user passes through three reference fields, and any one of them can be empty. Code that assumes a value exists at the end will fail on the first record that breaks the chain, often at an inconvenient time. Test the path with a record where each link is missing, and decide the expected output for each case before the code is written.
Telling whether the design holds
Measure the paths that matter. Look at the run time of the reports and scheduled jobs that use walked fields, and compare it with the run time after each major release of data. Compare row counts between a report run as an administrator and a run as a representative user, because any gap points to an access issue rather than a data issue. Check the slow query and transaction records for statements that repeat with the same table pattern many times in one transaction, which is the signature of a walk inside a loop.
When a path is slow, first try reducing the rows it touches, by adding a filter or narrowing the time window, before changing the path itself. Much slowness comes from scope rather than from the walk, and a smaller set often makes a walk acceptable again.
When dot-walking is the wrong tool
Stop using dot-walking for analysis that spans large history, for relationships that are not held as reference fields, and for any calculation that must be reproducible for an audit. For historical analysis, use a reporting table or an exported dataset with its own definitions. For many-to-many relationships, query the relationship table explicitly. For audit evidence, store the value at the moment of the decision, because a walked value reflects whatever the related record says when the report runs.
Harder questions about walks in production
Why does a walked field show a value on one list and not on another?
The two lists often apply different access rules or different filters before the walk is evaluated. Check whether the second list is filtered on the related table, which can exclude records the walk would otherwise return, and check whether the user has read access to the related table on that list’s source.
Is it acceptable to dot-walk inside a business rule on a busy table?
It can be, if the rule runs only on the changed fields and the walk reads one related value. Where the rule runs on every update, a walk adds a lookup to each write, and the cost multiplies across the table. The governance of business rules and their performance is the right place to set that limit.
Should a walked value be copied onto the parent record?
Copy it only when the copy is kept current by a defined rule and when reports need it frequently. A copied value is faster to read but can drift when the source changes, so give the copy an owner and a refresh rule, and document which reports depend on it.
Next step
Checking the paths in use, run as a standard user at realistic volume, can show which walks to keep and which to replace with an explicit query, and how to make the results match across roles.
The related guidance on encoded queries covers the filter side of the same problem, and the design of workflow data context covers how to decide which values a process should carry in the first place.
Frequently asked questions
Is dot-walking or a query more efficient?
Dot-walking is simpler but queries are more flexible and often faster for large datasets. A query can join multiple tables in one database operation; dot-walking does separate lookups for each traversal. For small datasets or single-record access, dot-walking is fine. For reports or processes touching millions of records, queries are usually better.
Can I dot-walk backwards from a related table to the original table?
No, dot-walking only works along foreign key relationships. You cannot dot-walk backwards unless there is a reverse foreign key defined. You would need to use a query or a related list field to handle many-to-one relationships going backwards.
What happens if I dot-walk to a field in a deleted related record?
The dot-walked field will be empty or null. The foreign key relationship will still exist, but the related record no longer exists, so there is no data to retrieve. This is why some records show blank related data—the data was deleted or the relationship was broken.
Related guides
Related Oblytech services
Where this topic turns into delivery work, these are the Oblytech services that cover it.
Planning, running or fixing a ServiceNow programme? Tell us where you are and we will suggest a sensible next step.
Contact us