- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-07-2026 08:06 AM
Hey all,
On one of our catalog items, I have a list collector variable that uses the follow reference qual filter which uses a script include to only display records in the u_sjp_partner_practices table where the user selected from the user variable is associated to.
javascript:new PracticeFilter().getPracticeFilter(current.variables.user);
This executes the following Script Include which is client callable called PracticeFilter:
var PracticeFilter = Class.create();
PracticeFilter.prototype = {
getPracticeFilter: function(userSysId) {
var ids = [];
var filter = 'sys_idIN';
gs.info('[PracticeFilter] Called with userSysId: ' + userSysId);
if (!userSysId) {
gs.warn('[PracticeFilter] No userSysId provided, returning sys_idISEMPTY');
return 'sys_idISEMPTY';
}
var assocGR = new GlideRecord('u_sjp_pss_firm_association');
assocGR.addQuery('u_user', userSysId);
assocGR.query();
gs.info('[PracticeFilter] Found ' + assocGR.getRowCount() + ' association records for user: ' + userSysId);
while (assocGR.next()) {
if (assocGR.u_pss_practice_name)
ids.push(assocGR.u_pss_practice_name.sys_id.toString());
}
if (ids.length === 0) {
gs.warn('[PracticeFilter] No practices found for user: ' + userSysId);
return 'sys_idISEMPTY';
}
filter += ids.join(',');
gs.info('[PracticeFilter] Returning filter: ' + filter);
return filter;
},
type: 'PracticeFilter'
};
So what this script does is it queries another custom table that we have created called
I have checked the test users access to the table and to the records using Access Analyzer and it comes back as a pass on all ACL's. So I'm at a bit of a loss here, is this just messy ACL's or is there something else that I need to ensure has been set up to allow them to run this query?
Thanks in advance for any assistance!
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-08-2026 07:52 AM
Thanks all, you all got me on the right path that eventually lead me to this ServiceNow KB that resolved the issue for me.
https://support.servicenow.com/kb?id=kb_article_view&sysparm_article=KB2283949
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-08-2026 02:54 AM
check my latest comment.
Ankur
✨ Certified Technical Architect || ✨ 10x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-08-2026 03:15 AM
query_range and query_match ACL are created on field level not on the table level
update those ACLs as u_sjp_partner_practices.* and check
Please mark my answer as helpful/correct if it resolves your query.
Regards,
Chaitanya
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-07-2026 09:55 AM - edited 01-07-2026 09:56 AM
Your instance may be configured in such a way that the user role requires query_range access. Try creating a query_range ACL for each table and assigning the role to it and see if that resolves your issue.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-08-2026 02:53 AM
Things to do
-> you need to create query_range ACL with Table.* i.e. u_sjp_partner_practices.*
-> Give role to that ACL and it will start showing records for non-admins in portal list collector variable
-> Also in variable attributes of your list collector add this so that it dynamically shows filtered records based on user variable
ref_qual_elements=user
-> Also try creating query_range ACL for u_sjp_pss_firm_association.u_user and add snc_internal role
💡 If my response helped, please mark it as correct ✅ and close the thread 🔒— this helps future readers find the solution faster! 🙏
Ankur
✨ Certified Technical Architect || ✨ 10x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-08-2026 08:48 AM
I believe I shared the same solution to use query_range Table.* ACL
Could you please mark my response as correct as well so that I can receive credit for it?
Ankur
✨ Certified Technical Architect || ✨ 10x ServiceNow MVP || ✨ ServiceNow Community Leader
