Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-11-2022 12:00 AM
I have the below script that runs well.
I would like to add in this 2 Assignment Groups 'is' and 'contains'
Thanks in advance!
var count = new GlideAggregate('incident');
count.addEncodedQuery('active=true^assigned_toISNOTEMPTY');
count.addAggregate('COUNT');
count.groupBy('assigned_to');
count.query();
while (count.next())
{
gs.eventQueue('inc.rem','','',count.assigned_to.email,count.assigned_to.name+"|"+count.assigned_to.sys_id);
}
Solved! Go to Solution.
1 ACCEPTED SOLUTION
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-11-2022 12:08 AM
Hi Max,
You can right click on the filter and select "Copy Query", this will give you the code which you can use for the "addEncodedQuery". Don't forget to put an additional ^ in.
If my answer has helped with your question, please mark it as correct and helpful.
Kr!
Robin
Kr!
Robin
2 REPLIES 2
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-11-2022 12:08 AM
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-11-2022 12:10 AM
gr.addEncodedQuery('assignment_groupLIKEIT ops-^ORassignment_group.name=IT helpdesk');
If its helpful mark answer as correct
Regards,
Anshu
Anshu