Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-12-2022 07:13 AM
1 ACCEPTED SOLUTION
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-12-2022 07:20 AM
Hello
TRY THIS SCRIPT
var arr=[];
var agg = new GlideAggregate('incident');
agg.addAggregate('COUNT', 'caller_id');
agg.query();
while (agg.next()) {
//do things on the results
var incidentCount = agg.getAggregate('COUNT', 'caller_id');
if(incidentCount>5)
{
arr.push(agg.caller_id.name.toString());
}
}
gs.info(arr);
MARK MY ANSWER CORRECT IF IT HELPS YOU
1 REPLY 1
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-12-2022 07:20 AM
Hello
TRY THIS SCRIPT
var arr=[];
var agg = new GlideAggregate('incident');
agg.addAggregate('COUNT', 'caller_id');
agg.query();
while (agg.next()) {
//do things on the results
var incidentCount = agg.getAggregate('COUNT', 'caller_id');
if(incidentCount>5)
{
arr.push(agg.caller_id.name.toString());
}
}
gs.info(arr);
MARK MY ANSWER CORRECT IF IT HELPS YOU