GlideAggregate: duplicates

var ga= new GlideAggregate('task');
ga.addAggregate('COUNT', 'number');
ga.addHaving('COUNT', '>', 1);
ga.query();
    var dupls=[];
    dupls.push("The following " + ga.getRowCount() + " records are duplicate on number ");
  while (ga.next()) {
        var DuplLine=ga.getAggregate('COUNT', 'number') + " => " + ga.getElement('number');
     dupls.push(DuplLine);

gs.print(DuplLine);
 }

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