GlideAggregate: duplicates on group cost centers

  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

Popular posts from this blog

GlideRecord setValue

variable advanced reference qualifier example

Running transform maps asynchronously