GlideAggregate: incidents by category


var ga = new GlideAggregate('incident');
ga.addAggregate('COUNT', 'category');
//ga.addActiveQuery();
ga.setGroup(true);
ga.groupBy("category");

ga.query();

while(ga.next()) {
  gs.info('Category ' + ga.category + ' ' + ga.getAggregate('COUNT', 'category'));
}

Comments

Popular posts from this blog

Running transform maps asynchronously

Post a command to the ECC queue for the mid server to initiate a powershell file copy

GlideRecord setValue