Transform map to avoid insert

gokul arumugam
Kilo Contributor

HI All,

I am trying to update value in location table based upon address, city, state, zip. In a transform map i make all 4 field coalesce = true. I want to update my record if my coalesce conditional match or else it should not record any new record in location table.

FYI: coalesce 4 fields are not reference filed, so i can't find Choice action to reject it

Below code will work, If coalesce condition fail in my case

if (action == 'insert') ignore = true;

Thanks,

Gokul

9 REPLIES 9

Yes, i don't want to insert in all scenario, if 4coalescing field match found it will update the record or else it should not do anything.

 

find_real_file.png

you can use here conditional coalesce scripts. refer the doc link here. 

https://docs.servicenow.com/bundle/geneva-servicenow-platform/page/administer/managing_data/referenc...

 

 

Below onBefore script will work for me.?

 

if((source.u_zip != target.zip)&&(source.u_address != target.street)&&(source.u_state != target.state)&&(source.u_city != target.city))
{


ignore = true;


}

you have to write here gliderecord and then do the  query to check if source column value exist on the target table record or not. then based on that you can perform further action here. 

 

if you see the doc it has mentioned example. kindly try with that way. 

 

i don't think target.<field name> here going to give you any value. 

 

 

 

Harsh Vardhan
Giga Patron

any update on this thread. 

if i answered your query kindly mark my answer as correct and close this thread.