Dynamically change target table in transform map
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-20-2016 03:19 AM
Hello,
Is it possible to dynamically change the target table in the transform map at the row level?
For example when importing data into CMDB, instead of importing into cmdb_ci base table, being able to specify at record level to which extending class to import an item.
I know it possible to specify the sys_class_name, but the extending fields will only be available once the record is saved. Obviously I'm not expecting the extending fields to be available in the field mapping. It would be enough if the extending fields could be populated in the script section.
Regards,
Alex
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-20-2016 06:41 AM
Alex,
This article has a lot of information that you will find useful:
http://wiki.servicenow.com/index.php?title=Transform_Map_Scripts#gsc.tab=0
I use the techniques listed there for setting target.sys_class_name for child tables. If you are looking to do an import of unrelated tables, you can use multiple transform maps, and set ignore = true; for the records that should not be targeted by the currently executing transform map.