Transform Map inserting new records to the target fields reference table

Sonu Singh
Mega Expert

Hi,

I have a Transform Map in which I am trying to update a reference field and both(parent & child) the fields are  made Coalesce too. 

My target table is a cmdb_rel_ci(which contains Parent &  Child)

Parent field is a reference field on target table which refers to cmdb_ci table.

The coalesce is enabled on both the fields in field mapping and choice action is create.

There are situations where the Data source contain different name (not exactly as it is in the reference table). In such case it creates a new record into the cmdb_ci  table with cmdb_ci.class as "Configuration Item". which is not correct, where I need to update class name as "XYZ parent" & similarly child.class as "xyz child".

 

Thanks.

4 REPLIES 4

Pradeep Sharma
ServiceNow Employee
ServiceNow Employee

Hi Sonu - This is expected behaviour. You can set choice action to ignore which will not create a new record in the target referenced table. 

Include logic to update the target record via OnBefore Transform script.

 

- Pradeep Sharma

Hi Pradeep,

 

Thanks for quick response.

Without changing the choice action to ignore, can i update that record via onAfter script?

 

Thanks.

I don't think so. But any reason you want to have choice action set to create if you don't want to create new records in reference table?

Prince7
ServiceNow Employee
ServiceNow Employee

If doing by script, try creating parent and child recrods first get their sys_id and update it in cmdb_ci_rel table