how to group by class name change class name in cmdb_ci_network_circuit table

sowjanyavikram5
Tera Contributor

sowjanyavikram5_0-1716545282492.png

 

3 REPLIES 3

Maik Skoddow
Tera Patron
Tera Patron

Don't understand your question. Please provide more details.

Anurag Tripathi
Mega Patron
Mega Patron

Hi,

Can you elaborate what the issue is?

Generally speaking, You can just right click on the Class header column and group by it. How ever in your screenshot you have a filter that class = Logical Connection , so you will only see 1 group, if you want to see all groups then remove the filter and then apply grouping.

-Anurag

Vishal Savajia1
Kilo Sage

You can rename table name to  cmdb_ci_network_circuit to Logical connect or vise versa.

 

or 

 

var gr = new GlideRecord('cmdb_ci');

gr.addQuery( 'name' , 'AUBX04')

gr.query();

while(gr.next()) {gr.sys_class_name.setValue('table_dictionary_name);   //For instance Logical COnnection.

 

gr.update();

 

gs.print(gr.getClassDisplayValue());

 

 



}

)

 

I sense you want to see distinct Value of column class

 

var ga = new GlideAggregate('cmdb_ci_network_circuit');
ga.addAggregate('count');
ga.addAggregate('count(distinct','class');
ga.setGroup(false);
ga.query();
while(ga.next())
 {
gs.info(agg.getAggregate('count(distinct','class')));

}

 

Try to run in background Script