Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

How do I copy one array (i.e. List) to another in a business rule?

Shane J
Tera Guru

I need to copy an array (List) from the Idea table to a new Project record that has another field setup exactly the same way.   A straight-up 'setValue' doesn't work.

23 REPLIES 23

randrews
Tera Guru

.toText may work for you depending on how you have the variables laid out.. hard to tell without the definition of the two variables....



if it IS an array format the array utilities are helpfull if you need to trim/manhandle the array.


http://wiki.servicenow.com/index.php?title=ArrayUtil#gsc.tab=0


Raymond, what do you need to see dictionary-wise?


sachin_namjoshi
Kilo Patron
Kilo Patron

Below post has solution to move list content in another list


You will need to update this code



Populate List Collector From Another List Collector



Regards,


Sachin


I'm doing this via BR not a CS.