- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-27-2022 02:53 AM
Hi all,
I have a scenario where I have to create Relationship in two tables (Related List). Applies to table is "Case" and Queries from table is "Custom" Table. There is a common reference field in both the table and that refers another table. So how do I compare a reference field from "Case" Table and "Custom" table.
Thanks
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-27-2022 03:37 AM
Hi @Sid_Takali ,
Yes I got it. You have the case table and custom table. custom table the case reference field and case table has the custom table field.
we can display related data on custom table which is using on case and vice versa.
ServiceNow Community MVP 2024.
Thanks,
Pavankumar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-27-2022 03:24 AM
Hi @Sid_Takali ,
you are planning to get the custom table records which is using case and show those specific records on cases related list.
(function refineQuery(current, parent) {
current.addQuery('casereferencefield', parent.sys_id); //give the case rference filed name which is on custom table.
})(current, parent);
ServiceNow Community MVP 2024.
Thanks,
Pavankumar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-27-2022 03:29 AM
Hi @Pavankumar_1 Thanks for your prompt response.
but the thing here that the common field between these two tables is reference field, no other field is common in between. There is no parent field on custom table.
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-27-2022 03:37 AM
Hi @Sid_Takali ,
Yes I got it. You have the case table and custom table. custom table the case reference field and case table has the custom table field.
we can display related data on custom table which is using on case and vice versa.
ServiceNow Community MVP 2024.
Thanks,
Pavankumar

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-27-2022 03:26 AM