Transform Map Creating New Records Instead of Updating
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-27-2024 01:49 AM
I am using a Transform Map to update the CMDB table with Serial Number as the coalesce field.
Some serial numbers have spaces, like: VMware-42 24 b5 45 02 a9 6a 36-d3 75 78 ad f6 61 8b 41.
When the Transform Map runs, it creates a new record instead of updating the existing one. Could the spaces in the serial number be causing this issue? How can I ensure the Transform Map updates the correct record?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-27-2024 02:00 AM - edited 11-27-2024 02:02 AM
Hi,
Coalesce is _unique_ - so it have to be exactly that value - else its treated as a new record.
You got a couple of possibilities
Remove the spaces from the serial number or find a field thats more consistant than serial number
Ex of a field mapping script that could help you - though its not validated
answer = (function transformEntry(source)
return source.serial_number.toString().replaceAll(' ', '');
})(source);