What is the best way to show two serviceNow tables in one table
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-13-2024 03:40 AM
My requirement is as follows: I need to retrieve fields from two tables and display them in a single table on a ServiceNow portal. It's not necessary to obtain all fields from the two tables; I only need to select some fields from both. To make the connection between the two tables, I have to match two fields that are not sys_id fields.
Another requirement involves filtering records to display only those that are relevant to a specific customer. It's hard to use default filter in ServiceNow to complete my requirement.
Please suggest the best way to accomplish these tasks.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-13-2024 09:14 PM
Hi @guruprasadm
If one of the tables has lots of records, it may reduce the performance of ServiceNow, right? Can you suggest any other way to complete my task?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-13-2024 05:01 AM
Retrieving Fields from Two Tables and Displaying Them in a Single Table:
To retrieve fields from two tables and display them in a single table, you can use reference fields and dot-walking. Here’s how:
Reference Fields:
If you’re using the out-of-the-box tables in ServiceNow (such as sys_user for users and core_company for companies), they are linked by a reference field on the sys_user table called company.
Reference fields act like foreign keys, allowing you to query through them to access fields on the referenced record
Filtering Records Relevant to a Specific Customer:
To filter records based on a specific customer, you can customize the list view or form view in ServiceNow.
Assuming you have a reference field linking your records to customers (e.g., a customer field), you can create a filter condition.