Transform Map inserting new records to the target fields reference table
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-25-2020 08:45 AM
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.
- Labels:
-
Scripting and Coding

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-25-2020 08:55 AM
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-25-2020 09:00 AM
Hi Pradeep,
Thanks for quick response.
Without changing the choice action to ignore, can i update that record via onAfter script?
Thanks.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-25-2020 01:38 PM
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?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-02-2020 05:41 PM
If doing by script, try creating parent and child recrods first get their sys_id and update it in cmdb_ci_rel table