Can we pass two parameters of the script include in the List collector Qualifier
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-20-2022 07:30 AM
Hi,
How we can pass two parameters in the list collector advance qualifier.
Thanks

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-20-2022 07:40 AM
This link may help you, as it talks about using variables in a list collector dynamic reference qualifier
List collector dynamic reference qualifier
If this solved your issue, please mark this correct and helpful, thank you!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-20-2022 07:52 AM
Hi
can you share business requirement?
Thanks,
Pavankumar.
ServiceNow Community MVP 2024.
Thanks,
Pavankumar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-20-2022 07:56 AM
Hi,
why not?
it will be like this
javascript: new getRoles().getProdRole(parm1,parm2);
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-20-2022 08:24 AM
Hi
this is my script
getProdRole: function() {
var gr;
var gec = this.getParameter('sysparm_callerSysID');
var roleName = this.getParameter('sysparm_role_name');
if (roleName == 'Manager') {
roleName = 'owned';
}
var gec = new GlideRecord('u_product');
gec.addQuery(roleName, gec);
gec.query();
while (gec.next()) {
//dri.push(gec.name.toString());
var pri = gec.name.toString();
}
return "sys_idIN" + gr.toString();
//return JSON.stringify(gr);
},
and List collector variable is -
javascript: new getRoles().getProdRole(current.variables.select_the_user, current.variables.select_people_role);
How to achieve that. I tried but nothing is coming in the variable.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-20-2022 08:56 AM
Hi,
Please try below script but not sure why you are using getParameter if are created client script and getting these parameters from that . Then it will not work.
Advanced reference qualifier are server side scripting it will not execute if you try from client side scripting.
if my opinion is correct then try to query in the script include and get those parameters.
getProdRole: function() {
var gr;
var pri = [];
var gec = this.getParameter('sysparm_callerSysID');
var roleName = this.getParameter('sysparm_role_name');
if (roleName == 'Manager') {
roleName = 'owned';
}
var gec = new GlideRecord('u_product');
gec.addQuery(roleName, gec);
gec.query();
while (gec.next()) {
pri = gec.name.toString();
}
return "sys_idIN" + pri;
},
Hope you it helps you.
Please Mark ✅ Correct/helpful if applicable, Thanks!!
Regards
Pavankumar
ServiceNow Community MVP 2024.
Thanks,
Pavankumar