Unable to run Script Include from sys_user_group_types table
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-06-2025 07:43 AM
Hi All,
My org is setting up report views as a way for end users to see their own and related teams task items.
To do this we've set up a dashboard with a filter that allows them to display based on group types. The problem is the script include isn't working.
Checking the work in the Scripts - Background with a gs.log, I do see the SysIDs of the group types. But when running the same script include from the Group Types table I get 0 results.
Any ideas about the script or possibly a business rule?
function Test() {
var myID = gs.getUserID();
var myIDString = myID.toString();
var grpTypeList=[];
var gr = new GlideRecord("sys_user_grmember");
gr.addEncodedQuery("user=" + myIDString + "^group.typeISNOTEMPTY");
gr.query();
var i=0;
while(gr.next()) {
grpTypeList.push(gr.group.type);
}
return grpTypeList;
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-14-2025 11:47 AM
The issue appears to be a business rule, though I am unable to find out which one.
I added the line