I am trying to concatenate two reference lists, and no matter what I do I end up with weird stuff

verdakosnett
Tera Expert

find_real_file.png

I tried many things but here is my latest attempt that creates the above mess:

var assigned=org.name.toString().trim();

mainTasker.u_glide_list_3=mainTasker.u_glide_list_3.concat(assigned+', ');

1 ACCEPTED SOLUTION

Abhinay Erra
Giga Sage

Before going into the code, are these three list fields on the same table? If yes, then the following code will work



var arrayUtil = new ArrayUtil();


var a1 = gr.<list1 field name>.toString().trim().split(',');


var a2=   gr.<list2 field name>.toString().trim().split(',');


gr.<list3 field name>=arrayUtil.union(a1,a2).join();


gr.update();


View solution in original post

6 REPLIES 6

to remove the error, you may try adding "global."   before "ArrayUtil();". So the second line in your script would be



var arrayUtil = new global.ArrayUtil();


verdakosnett
Tera Expert

Thanks Abinay and John. It worked great!!