neharao
Giga Contributor

Hi all,



Thanks for all your replies. I am actually able to populate single value from Affected CIs to Journal field. Can anyone kindly guide me how to populate all the values in the affected CIs to the Journal field. Please find the script and screen shot below.



var incnumber=current.sys_id;


var curr="0c441cfdc61122750182c132dd03ab88";


var lookup=new GlideRecord("task_ci");                 // task_ci is the affected cis table


  lookup.initialize();


  lookup.task=incnumber;


  lookup.ci_item=curr;// task field holds incident number in OOB


  var ci = lookup.ci_item;


  var cidisp = ci.getDisplayValue();


    lookup.insert();  


  current.u_journal =ci.getDisplayValue();



With the above script i am able to push only one value in the jounal field.



find_real_file.png


find_real_file.png


                                                                                                                                                   



If anyone knows on this kindly guide me.



Thanks,


Neha