- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-23-2023 09:39 PM - edited 07-23-2023 11:04 PM
Client Script : onChange
Create a new date field 'NEXT REVIEW DATE' and write code. Condition is : restrict the date field as it may allow only next 10 days from today
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-23-2023 11:08 PM - edited 07-23-2023 11:09 PM
Ah oke.
Out-of-the-box, its the combination of Category and Subcategory. Especially Subcategory is important to look at.
When opening the dictionary for Subcategory:
1.
2.
That's all! Zero scripting or GlideAggregate.
Kind regards,
Mark Roethof
Independent ServiceNow Consultant
10x ServiceNow MVP
---
~444 Articles, Blogs, Videos, Podcasts, Share projects - Experiences from the field

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-23-2023 11:08 PM - edited 07-23-2023 11:09 PM
Ah oke.
Out-of-the-box, its the combination of Category and Subcategory. Especially Subcategory is important to look at.
When opening the dictionary for Subcategory:
1.
2.
That's all! Zero scripting or GlideAggregate.
Kind regards,
Mark Roethof
Independent ServiceNow Consultant
10x ServiceNow MVP
---
~444 Articles, Blogs, Videos, Podcasts, Share projects - Experiences from the field
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-23-2023 10:22 PM
Hi @SNOW24 ,
Are you looking for incidents open for each subcataory?
Try this:
var agg = new GlideAggregate('incident');
agg.addAggregate('COUNT', 'category');
agg.orderBy('category');
agg.orderBy('subcategory');
agg.query();
while (agg.next()) {
//do things on the results
var incidentCount = agg.getAggregate('COUNT', 'category');
var category = agg.getDisplayValue('category');
var subcategory = agg.getDisplayValue('subcategory');
gs.info('Display the count {0} and category {1} subcatagory {2}', [incidentCount, category,subcategory]);
}
Thanks and Regards,
Rahul

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-23-2023 11:11 PM - edited 07-23-2023 11:11 PM
Why are you updating the topicname and description again? And now its even extremely different than your original question?!
Just post a new question instead. Now people are responding, helping, etc. and suddenly you are changing everything 😅
And it would be nice if you also acknowledge that people are helping you for FREE.
Kind regards,
Mark Roethof
Independent ServiceNow Consultant
10x ServiceNow MVP
---
~444 Articles, Blogs, Videos, Podcasts, Share projects - Experiences from the field
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-23-2023 11:38 PM
ok thank you