- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-26-2023 09:54 PM
Hello Everyone,
I was trying to solve below problem statement:
1. Get the count of incident group by caller and print only 3 caller having maximum number of incidents.
I tried below Script:
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-27-2023 05:58 AM
Hi Sameer,
The setLimit method does not work with GlideAggregate, so it's likely that this line is being ignored, and you would get the same results if it were excluded. You can either wrap this GA in a for loop:
for(var i=0; i<3;i++) {
or replace your setLimit line with:
incidentGR.chooseWindow(1,3);
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-27-2023 05:58 AM
Hi Sameer,
The setLimit method does not work with GlideAggregate, so it's likely that this line is being ignored, and you would get the same results if it were excluded. You can either wrap this GA in a for loop:
for(var i=0; i<3;i++) {
or replace your setLimit line with:
incidentGR.chooseWindow(1,3);
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-19-2023 09:17 PM
incidentGR.chooseWindow(1,3); works fine.
Thank you!