How to update records in target table using transform map

Priya75
Tera Contributor

Hi All,

 

I want to update records , I am using coalesce on name field but i want to update only active records in target table.

how can i achieve that. I am using  before transform script ,but it is not updating the records where active is true and name field has a duplicate(one as active=false).

 

 

if(action == "insert"){
ignore = true;
}

if(action=="update" && target.active == true){
action="update";

}

 

 

17 REPLIES 17

@Priya75 

if it's coming inside the IF then that row should be ignored

I hope you have created this script in onBefore transform script

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

yes, it is a onbefore one. yeah but the active one should be updated right?

it also shows target as empty

 

@Priya75 

sorry to say.

It's very difficult to understand without the screenshots.

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader