How to identify the coalesce fields updating it via transform map?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-28-2022 08:22 PM
I have a data source and transform map to update records in cmdb_ci_appl table. I need to update primary and secondary sites of some applicationn, We have coalesce on "name" and "application_id" fields to identify the records in target table. However, we have more than 1 record with same name and application_id in target table. So transform map is updating the first identified record. We need to put a validation in place so that correct record will be identified and updated by the transform map. The validation is like, if the sys_class_name == cmdb_ci_appl (this field is not in the map) then only update. Please note that our data source has only 4 fields in it, application_id name, primary site and secondary site, Any ideas on how this can be achieved? Thank you.
- Labels:
-
Scripting and Coding
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-28-2022 08:51 PM
Hello
Can you explain again if there are two records where name and application id matches hwhich record to update
Like what should tge system consider to identify tge record to update?
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-28-2022 08:56 PM
Hi
it is correct I have 2 records where the name and the application id are repeated, the only one that must be updated is the record that meets this condition sys_class_name == cmdb_ci_appl
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-28-2022 09:02 PM
Wirte a onbefore transform script
If (target.sys_class_name !=cmdb_ci_appl)
{
ignore true;
}
Please mark answer correct/helpful based on impact
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-28-2022 09:21 PM