Create a report

Shashi K
Tera Contributor

My requirement is create a report to how many similar changes have gone multiple CABs, not showing single records of CAB name.

so I have write the script and calling into the report but its not working. please help for this Thankyou.

 

function getDuplicateValues(table, field){
    var dupValues = [];
    var ga = new GlideAggregate(table);
    ga.addAggregate('COUNT', field);
    ga.addNotNullQuery(field);
    ga.groupBy(field);
    ga.addHaving('COUNT', '>', 1);
    ga.query();
    while (ga.next()) {
        dupValues.push(ga[field].toString());
    }
    return dupValues;
}
 
ShashiK_1-1700226007864.png

 

11 REPLIES 11

but it showing like this 1 record i cab

ShashiK_0-1700229265717.png

i want same change record with multiple cabs not a single cab

So you want somthing

AtulyaLNG_0-1700229499973.png

 

Which is not OOTB available and I am on still my point, need to script for this and that is time consuming. 

*************************************************************************************************************
If my response proves useful, please indicate its helpfulness by selecting " Accept as Solution" and " Helpful." This action benefits both the community and me.

Regards
Dr. Atul G. - Learn N Grow Together
ServiceNow Techno - Functional Trainer
LinkedIn: https://www.linkedin.com/in/dratulgrover
YouTube: https://www.youtube.com/@LearnNGrowTogetherwithAtulG
Topmate: https://topmate.io/atul_grover_lng [ Connect for 1-1 Session]

****************************************************************************************************************