Copy one list collector values to another list collector

Ak8977
Tera Expert

I need toadd the  same data in one variable to another variable.
both the variables are of list collector type.
list collector 1 contains values of a, b,c. now if I add x,y,z to list collector 2 then it need to be added to list collector1.
the final value of list collector 1 would be a,b,c,x,y,z.

2 REPLIES 2

Community Alums
Not applicable

Hi @Ak8977 ,

Here is multiple ways you can do: If it in regular table not catalog items

if you want to see changes in form live

1. write onchange client script on list collector 1

SandeepDutta_0-1713841046136.png

 

    var users = g_form.getValue('u_users');
    g_form.setValue('u_users_2', users);
 
If you want perform on server side
2. write before BR
on table you know
insert and update
condition is list filed changes
in advanced
 
current.listfield2 = current.listfield1;
 
don't add anything else like current.update() in BR.
 
If it is catalog item
write onChange catalog client script in item
same above script or onsubmit also work as when submitting move values.
 

Hello @Community Alums ,
if I use set value it will overide existing values i.e a,b,c values. so it won't work.