Search globaly reference field data
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-20-2025 10:20 AM
There is some OOB table, on which we have created a custom reference field which refer to a custom table, so the requirement is when we search globaly any specific field of that custom table it should return the OOB table record.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-20-2025 11:00 AM
Hi @saba tanveer ,
Option 1: Use a Display Field in the Reference
If the custom table’s display value is u_code, and the field u_custom_app_ref on the OOB table is configured to show that, then:
- Set the display field of u_custom_app to u_code
- Ensure u_custom_app_ref is marked as Display = true (or at least part of the default display)
Option 2: Index the reference field or create a denormalized field
If Option 1 isn't enough, you can denormalize the reference field’s key data into the OOB table and index that for search.
- Create a new field on the OOB table, e.g. u_custom_code_copy
- Use a Business Rule or Flow to populate it with current.u_custom_app_ref.u_code
- Mark u_custom_code_copy as:
- Display = true (optional)
- Text-indexed or include it in the global search configuration
- Rebuild the text index or allow time for reindexing
If my response helped, please hit the 👍Thumb Icon and accept the solution so that it benefits future readers.
Regards,
Pratik
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-20-2025 12:20 PM
Hi Saba Tanveer,
What you're trying to do is configure Global Search to return records from an out-of-box (OOB) table (like incident) based on values stored in a related custom table. This is a common requirement when extending the ServiceNow data model.
Here's how to approach this:
Ensure both tables are indexed: Go to System Definition > Search Sources and verify that both your OOB table and the custom table are included in the search sources.
Check the searchable fields: For the OOB table (e.g., incident), confirm that the reference field to your custom table is present, though the actual search behavior comes from referencing further fields.
Configure Referenced Field: This is the key part.
In your search configuration (from the Search Sources record), scroll to the Referenced Field Configurations related list.
Add a new configuration that maps the reference from the OOB table to your custom table and specifies which fields on the custom table should be searchable.
For example:
OOB Table: incident
Custom reference field on incident: x_custom_reference
Custom table: x_my_custom_table
Field to search: x_important_field
Your referenced field config will look like:
incident → x_custom_reference → x_important_field
Reindex: After saving, go to Search Engine > Indexes, find your index, and trigger a reindex so the new configuration takes effect.
Let me know if that helps — and if it solves your issue, feel free to mark this as the accepted answer.
Best,
Daniel Madsen