- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-06-2018 07:43 AM
Is it possible to create a configuration item reference qualifier to return all CI's from a parent class and include child class CI's as well. Currently you can specify individual classes but I would like to return all CI's below the server class for instance. I see there is a field called sys_class_path. Could this be used?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-21-2018 02:55 PM
Hi Shane,
More info here: https://developer.servicenow.com/app.do#!/api_doc?v=kingston&id=r_TU-getTableExtensions
Hope that helps!
Steve
ITSM Guy at Expedia Group
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-21-2018 02:55 PM
Hi Shane,
More info here: https://developer.servicenow.com/app.do#!/api_doc?v=kingston&id=r_TU-getTableExtensions
Hope that helps!
Steve
ITSM Guy at Expedia Group
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-23-2018 01:06 AM
Hi Steve
Thanks this is eaxctly what I needed. I can now extract all the table names and compile a list of CI's from all child tables using a script include.
Regards
Shane
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-18-2022 01:42 AM
Hi all,
In case somebody finds this thread, I want to give it an update here. There is a nice feature which can be used in reference qualifiers and encoded queries - it is "INSTANCEOF" operator which allows you to easily query a base table with query like "sys_class_nameINSTANCEOFcmdb_ci_server" and it will return you all records from child classes (e.g. Windows Server, Linux Server etc.).
You can also easily use it in the Condition Builder like "Class IS A Server". The operator "IS A" means "INSTANCEOF" while operator "IS" means simple equal operation. I found this super helpful and super easy. No need to script something to get CIs from a class including all the child classes.
Best regards,
Dominik