I want to fetch all the records from the cmdb_ci table with a certain hostname but host_name column is not a part of the cmdb_ci table. So, is their any way we could do this?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-11-2018 03:17 AM
I'm trying to get all the record with a specific hostname but as the host_name column is not part of the cmdb_ci table. So is there any way I could get all the record from various table extending cmdb_ci table through script.
- Labels:
-
Scripting and Coding
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-14-2018 06:26 PM
Although this is not recommended, please go through cmdb_rel_ci table which speaks about all the existing relationships and could be of great help as a starting point

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-17-2018 01:12 AM
I don't see why not. If you call GlideRecord.getValue("<field>") with a field that doesn't exist, it treats it as empty. So you should be able to either create a filter query directly or loop and filter. What exactly did you try that doesn't work?