- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-15-2023 09:09 PM
I want to list out all the APAC Life, Non Life application which are linked to any server.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-16-2023 12:22 AM
Hi Sonali,
I would suggest checking out the CMDB Query Builder. I think it will give you the result you are looking for.
You can set up a query like this, which will generate a list of applications and their underlying servers:
More information about the feature can be found here Build a CMDB query using the CMDB Query Builder
Hope this helps,
//Casper
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-15-2023 09:57 PM
Hi Sonali,
You would be able to see that already in your Server record, if the relationships have been set up correctly. PFB an example in screesnhot.
Please mark this comment as Correct Answer/Helpful if it helped you.
Cheers,
Hardit Singh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-16-2023 12:02 AM
Hi,
I want the record in list view
Like column application name, server name
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-15-2023 10:46 PM
@Community Alums you can query the ci relationships table and the list like below.
var apps = [];
var ciRelGr = new GlideRecord("cmdb_rel_ci");
ciRelGr.addQuery("parent.sys_class_name=<SERVER TABLE NAME HERE>");
ciRelGr.addQuery("child.sys_class_name=<APPLICATION TABLE NAME HERE>");
ciRelGr.query();
while(ciRelGr.next()){
apps.push(ciRelGr.child.toString());
}
var ciRelGr = new GlideRecord("cmdb_rel_ci");
ciRelGr.addQuery("child.sys_class_name=<SERVER TABLE NAME HERE>");
ciRelGr.addQuery("parent.sys_class_name=<APPLICATION TABLE NAME HERE>");
ciRelGr.query();
while(ciRelGr.next()){
apps.push(ciRelGr.parent.toString());
}
Please mark as correct answer if this solves your issue.
ServiceNow Community Rising Star, Class of 2023
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-16-2023 12:22 AM
Hi Sonali,
I would suggest checking out the CMDB Query Builder. I think it will give you the result you are looking for.
You can set up a query like this, which will generate a list of applications and their underlying servers:
More information about the feature can be found here Build a CMDB query using the CMDB Query Builder
Hope this helps,
//Casper