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 to copy List field values from one table to another table.

Akshata5
Tera Guru

Hello,

 

I am trying to copy List field values from Demand table to Project table List field.

 

Can anybody help me with script please.

 

Regards

Akshatha

1 REPLY 1

Akash4
Kilo Sage

Hi Akshata,

You can write BR on Insert/Update of Project table (Async is good idea). Make sure the Demand field will be populated on Project. Script idea is given below:

(function executeRule(current, previous) {
var gr = new GlideRecord('dmn_demand');
if (gr.get(current.demand)) {
current.<list_project> = gr.<list_demand>;
current.update();}
})(current, previous);

Regards, Akash
If my response proves useful, please mark it "Accept as Solution" and "Helpful". This action benefits both the community and me.