- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-25-2022 11:27 AM
Hi,
I have a script include in which we are returning the value and by the client script we set the value in the list collector.
But the problem is that value is not visible in the request summary although it is populating in the form. I checked all the UI policies client script written on that variable.
Please help in this,
Thank you!
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-27-2022 06:27 AM - edited 10-27-2022 06:31 AM
Hi @Samiksha2 ,
The issue that I see is in your script include. You should be returning the list of sys_id back to your client script as list collector expects sys_id and not the name of the record(s).
Just for fun, before making any change, could you please test your onchange client script from backend and not portal. I am sure your field will not autopopulate.
I would suggets make change as shown below and I believe it should work:
getRoleFam: function() {
var dri = [];
var p_dri = this.getParameter('sysparm_callerSysID');
var roleName = this.getParameter('sysparm_role_name');
if (roleName == 'Product Family Manager') {
roleName = 'taxonomy_node_owner';
}
var recDri = new GlideRecord('spm_taxonomy_node');
recDri.addQuery(roleName, p_dri);
recDri.query();
while (recDri.next()) {
dri.push(recDri.getUniqueValue());
}
return JSON.stringify(dri);
},
Pleae let me know if this do not works.
I Hope this helps.
Please mark this helpful if this helps and Accept the solution if this solves your issue.
Regards,
Kamlesh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-27-2022 06:01 AM
Thanks @Logan Poynter . I also checked without using script. List collector values are populating in the summary. It is weird y it is not coming.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-27-2022 06:07 AM
Yeah it's working fine for me without a script. I'm not quite sure what the expected value would be for this to translate from form to summary. If I get some time I will go in and try to replicate the querying you're doing.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-27-2022 06:09 AM
thank you
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-27-2022 06:27 AM - edited 10-27-2022 06:31 AM
Hi @Samiksha2 ,
The issue that I see is in your script include. You should be returning the list of sys_id back to your client script as list collector expects sys_id and not the name of the record(s).
Just for fun, before making any change, could you please test your onchange client script from backend and not portal. I am sure your field will not autopopulate.
I would suggets make change as shown below and I believe it should work:
getRoleFam: function() {
var dri = [];
var p_dri = this.getParameter('sysparm_callerSysID');
var roleName = this.getParameter('sysparm_role_name');
if (roleName == 'Product Family Manager') {
roleName = 'taxonomy_node_owner';
}
var recDri = new GlideRecord('spm_taxonomy_node');
recDri.addQuery(roleName, p_dri);
recDri.query();
while (recDri.next()) {
dri.push(recDri.getUniqueValue());
}
return JSON.stringify(dri);
},
Pleae let me know if this do not works.
I Hope this helps.
Please mark this helpful if this helps and Accept the solution if this solves your issue.
Regards,
Kamlesh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-27-2022 06:34 AM
Thank you @kamlesh kjmar . My issue is solved.