- 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 05:37 AM
No error is coming. I checked in console log.
also created onSubmit client script.
g_form.getValue('u_pt_people_product_family');
What I need to do to show the value?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-27-2022 05:41 AM
Use gs.log
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-27-2022 05:42 AM
gs.log I dont think will work in client script.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-27-2022 05:48 AM
@Logan Poynter I tried adding alert.
Value is coming in the alert.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-27-2022 05:58 AM
You're right, I meant console.log - apologies.
Since you're getting the value in your alert, let me get into my PDI and see if I have the same issue with a list collector in the ticket fields widget.