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-03-2022 10:10 PM
Hello there,
In the last line of the query where you have added the or condition for group_list. try using "CONTAINS" or "LIKE" as an operator instead of "IN".
also if still the issue persists try de activating query business rule and see if the user is able to see the list of incidents to determine whether the issue is from your query in the widget or from the query business rule.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-04-2022 07:42 AM
Thanks for the reply.
I tried disabling the business rules and that didn't seem to work.
I also updated the script to try "CONTAINS" and "LIKE" and that doesn't seem to be working either.
Thanks
Cobee

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-04-2022 09:32 AM
Hi cobee I missed it
the query you wrote will not work here. you need to create dynamic filters and need to use that dynamic query here.

- 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_listDYNAMIC90d1921e5f510100a9ad2572f2b477fe4
Mark as correct if it helps
Regards Thameem