- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-09-2023 04:54 AM
Hi All,
I need to clean up a cmdb table and remove the unrequired CIs from the table. The issue I'm facing is that I need to check that these CIs are not being referenced on some other table.
For example, if there is an incident/change/problem etc. create with a CI, I should not delete it.
Is there a way for me to check if a CI is being referenced in another table in the system?
Thanks in advance
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-09-2023 04:58 AM - edited 03-09-2023 04:58 AM
Hello @Greg33
You can use the script provided in this page to find all records where a field is referenced.
Find all System References to a Specific Record - ServiceNow Guru
If my reply has solved your question, please mark it as solution

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-09-2023 04:58 AM - edited 03-09-2023 04:58 AM
Hello @Greg33
You can use the script provided in this page to find all records where a field is referenced.
Find all System References to a Specific Record - ServiceNow Guru
If my reply has solved your question, please mark it as solution
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-09-2023 07:17 AM
Thanks Satyaki, that seems to be what I was looking for!

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-09-2023 05:07 AM
If the above does not work, then you can also check the solution provided here:
Get all references by sys_id from all tables - ServiceNow Community