How to get the number of open tickets assigned to the current assignment group and have to display a message
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-19-2022 02:47 AM
Hi,
How to get the number of open tickets assigned to the current assignment group and have to display a message like-"The assignment group has (this number of)tickets open"?
Regards,
Akhil
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-19-2022 03:33 AM
Hi
I would recommend you to cerate a report.
Refer to this thread: https://community.servicenow.com/community?id=community_question&sys_id=8805cb2ddbd8dbc01dcaf3231f96...
and this video :
Mark my answer correct & Helpful, if Applicable.
Thanks,
Sandeep
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-19-2022 05:53 AM
Hi Sandeep,
Thank you for your response,
when I assigned a ticket to a group then in the form of alert I want to show an alert like these ticket are pending on this group.
Regards,
Akhil
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-19-2022 06:20 AM
Hi Akhil,
You can write display BR and use below script and configuration to show message on form,
BR script :
BR configuration:
Script for your reference:
var ga = new GlideAggregate("incident");
ga.addQuery("assignment_group", current.assignment_group);
//add here state=pending filter
ga.addAggregate("COUNT", "assignment_group");
ga.query();
if (ga.next())
gs.addInfoMessage(ga.getAggregate("COUNT", "assignment_group"));
Note :change table name if it is not for incident table and add state=pending filter to show only pending ticket count.
Let me know if you have any further queries.
Please mark this as Correct or Helpful if it helps.
Thanks and Regards,
Abhijit
Community Rising Star 2022
Regards,
Abhijit
ServiceNow MVP