List collector value is not showing in the Request Summary

Samiksha2
Mega Sage

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!

1 ACCEPTED SOLUTION

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

View solution in original post

21 REPLIES 21

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. 

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. 

thank you

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

Thank you @kamlesh kjmar . My issue is solved.