- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago - last edited 3 weeks ago
Hi Team,
I have been asked to write the code align with the Below Image..
I have used glideAggrette.. But state is showing like 2,3 but not showing in display name and this bog space how to give.
My Code :-
var x=new GlideAggregate('incident');
x.addAggregate('COUNT','state');
x.query();
while(x.next()){
gs.print(x.state.+grIncident. getAggregate('COUNT','state'));
}
not getting the below Output
@David my Post is always getting in unapproved phase. Help me
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Hi @vidishaagarwal5
You need to change the Code to the below code
gs.print('State\\tIncident Count');
var x=new GlideAggregate('incident');
x.addAggregate('COUNT','state');
x.query();
while(x.next()){
gs.print(x.state. getDisplayValue()+'\t'+x. getAggregate('COUNT','state'));
}
This will Help
If you found my response helpful, I would greatly appreciate it if you could mark it as "Accepted Solution" and "Helpful."
Your support not only benefits the community but also encourages me to continue assisting. Thank you so much!
Thanks and Regards
Ravi Gaurav | ServiceNow MVP 2025,2024 | ServiceNow Practice Lead | Solution Architect
CGI
M.Tech in Data Science & AI
YouTube: https://www.youtube.com/@learnservicenowwithravi
LinkedIn: https://www.linkedin.com/in/ravi-gaurav-a67542aa/
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
As per community guidelines, you can accept more than one answer as solution. If my response helped you, please mark it as helpful and accept the solution.
Thanks,
Bhuvan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
@David and @Dan Bruhn can you help her .
Thanks in Advance !!
If you found my response helpful, I would greatly appreciate it if you could mark it as "Accepted Solution" and "Helpful."
Your support not only benefits the community but also encourages me to continue assisting. Thank you so much!
Thanks and Regards
Ravi Gaurav | ServiceNow MVP 2025,2024 | ServiceNow Practice Lead | Solution Architect
CGI
M.Tech in Data Science & AI
YouTube: https://www.youtube.com/@learnservicenowwithravi
LinkedIn: https://www.linkedin.com/in/ravi-gaurav-a67542aa/