var ga= new GlideAggregate('sys_user_group');
ga.addAggregate('COUNT', 'cost_center');
ga.addQuery('active', 'true');
ga.addHaving('COUNT', '>', 1);
ga.query();
var dupls=[];
dupls.push("The following " + ga.getRowCount() + " groups are duplicate on cost_center");
while (ga.next()) {
var DuplLine=ga.getAggregate('COUNT', 'cost_center') + " => " + ga.getElement('cost_center.code');
dupls.push(DuplLine);
gs.print(DuplLine);
}
Comments
Post a Comment