Group List widget
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-03-2022 08:33 AM
Hello,
We are looking at creating a widget on our service portal that will include all incidents where the user is on the watchlist of the incident or part of a group in the group list field.
This is working for the end users that are included in the watchlist, But not for the users that are part of the group in the group_list field.
I have configured a simple list on the portal with the following filter condition.
Any input on why this currently isn't functioning would be appreciated.
Thanks
Cobee
Also I have cloned the "incident query" before business rule to include the group_list field.
restrictIncidents();
function restrictIncidents() {
if (!gs.hasRole("itil") && !gs.hasRole("sn_incident_read") && gs.isInteractive()) {
//Do NOT restrict Incidents if SPM premium plugin is active AND user has the service_viewer role.
if (GlidePluginManager.isActive('com.snc.spm') && gs.hasRole('service_viewer'))
return;
var u = gs.getUserID();
var groups = gs.getMyGroups();
current.addQuery("caller_id", u).addOrCondition("opened_by", u).addOrCondition("watch_list", "CONTAINS", u).addOrCondition("group_list", "IN", groups);
}
}
- Labels:
-
Incident Management

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-04-2022 09:38 AM
you need to take your dynamic query from the filter refer the below screenshot
please use the below query and it will work for you
active=true^group_listDYNAMICd6435e965f510100a9ad2572f2b47744^ORwatch_listDYNAMIC90d1921e5f510100a9ad2572f2b477fe
Mark as correct if it helps
Regards Thameem
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-07-2022 07:48 AM
I was able to find the solution to the group_list portion of this by following the steps in this article.
https://community.servicenow.com/community?id=community_question&sys_id=b2378b29db1cdbc01dcaf3231f9619f8
Thanks