- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-21-2025 10:50 PM
Hi Team ,
I have 3 groups created for the Agile Development , Grp1 , Grp2 , Grp3 , I want to show stories assigned to their group only in the list view.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-21-2025 11:16 PM
then what script did you start with? something like this please enhance
Example: If logged in user belongs to Grp2 and Grp3 then that user will see stories where those 2 groups are there.
BR condition: !gs.hasRole('admin') && gs.getSession().isInteractive()
Script:
(function executeRule(current, previous /*null when async*/) {
// Add your code here
var groups = new global.ArrayUtil().convertArray(gs.getUser().getMyGroups());
current.addQuery('assignment_group', 'IN', groups.toString());
})(current, previous);
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-21-2025 11:16 PM
then what script did you start with? something like this please enhance
Example: If logged in user belongs to Grp2 and Grp3 then that user will see stories where those 2 groups are there.
BR condition: !gs.hasRole('admin') && gs.getSession().isInteractive()
Script:
(function executeRule(current, previous /*null when async*/) {
// Add your code here
var groups = new global.ArrayUtil().convertArray(gs.getUser().getMyGroups());
current.addQuery('assignment_group', 'IN', groups.toString());
})(current, previous);
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader