- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-05-2025 04:18 AM
Dear experts,
can anyone help on my issue.
I've created a Dynamic filter option like below
The ACL is like below with all the internal user can read this Filter
And the script include:
var UXDynamicFilterUtils = Class.create();
UXDynamicFilterUtils.prototype = Object.extendsObject(AbstractAjaxProcessor, {
getMyRegionAssignmentGroup: function() {
gs.info("====start=====");
var groups = [];
var currentUser = gs.getUser();
var returnValue = "";
gs.info(currentUser.isMemberOf("SC Shanghai"));
if(currentUser.isMemberOf("SC Shanghai")){
groups.push();
groups.push("aaa");
groups.push("bbb");
}else if(currentUser.isMemberOf("SC Singapore")){
groups.push("cc");
groups.push("dd");
}else if(currentUser.isMemberOf("SC Japan")){
groups.push("ee");
groups.push("ff");
}
gs.info("======returnValue=====");
return groups.join(",");
},
type: 'UXDynamicFilterUtils'
});
Can anyone help to find what this issue is?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-05-2025 04:21 AM
you should push group sysId into that array and not name
check this and see if any step is missed
Create your own Dynamic Filters
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
08-05-2025 04:25 AM
Hello @SystemsGo,
You can refer the below article as well:
https://www.servicenow.com/community/csm-articles/creating-dynamic-filter-option-to-fetch-the-incide...
If my response resolved your query, kindly mark it as Accepted and Helpful for future reference.
Best Regards,
Anshul
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-05-2025 04:21 AM
you should push group sysId into that array and not name
check this and see if any step is missed
Create your own Dynamic Filters
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
08-05-2025 04:31 AM
Thank you for your reply.
I've push the group sys_id to groups, the reason is I should return groups, not group.join
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-05-2025 04:25 AM
Hello @SystemsGo,
You can refer the below article as well:
https://www.servicenow.com/community/csm-articles/creating-dynamic-filter-option-to-fetch-the-incide...
If my response resolved your query, kindly mark it as Accepted and Helpful for future reference.
Best Regards,
Anshul