List of all Classes whose Base Class is "cmdb_ci"

prabh
Mega Expert

Hi All,

I want a list of all Classes whose Base Class is "cmdb_ci". Please help me how can I get the list.

Thanks & Regards,

Preety

15 REPLIES 15

Yes that is right. In demo less classes available may be. I took that screen shot from my instance


In my instance we have not run the disvocery yet ,might be thats why its also not showing all the classes in my instance as well



Is there any other way from where I can get the classess name


Yes . By using glide record we can get.



Below is the ex : code to get group by catgory



So in order to get a count of all of the open incidents by category the code would be:



var count = new GlideAggregate('incident'); count.addQuery('active', 'true'); count.addAggregate('COUNT', 'category'); count.query(); while (count.next()) { var category = count.category; var categoryCount = count.getAggregate('COUNT', 'category'); gs.log("The are currently " + categoryCount + " incidents with a category of " + category); }


The output will look like this:


             *** Script: The are currently 1.0 incidents with a category of Data *** Script: The are currently 11.0 incidents with a category of Enhancement *** Script: The are currently 1.0 incidents with a category of Implementation *** Script: The are currently 197.0 incidents with a category of inquiry *** Script: The are currently 13.0 incidents with a category of Issue *** Script: The are currently 1.0 incidents with a category of *** Script: The are currently 47.0 incidents with a category of request

Use TableUtils to get the complete list.


var table = new TableUtils("task");


gs.print(table.getTableExtensions());