- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-24-2016 07:16 AM
I have one import set table defined that will hold data for three (3) different classes: 1.) cmdb_ci_ip_firewall, 2) cmdb_ci_ip_router, 3.) cmdb_ci_ip_switch. In the import table, there is a class field that tells me what class the data needs to written to. The three classes will have two (2) attributes: 1.) sys_id and 2.) os_version. In the transform map, do I need to defined three (3) different maps, or is there a way that I could scripted it to updated the three classes depending on what class record I'm processing?
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-25-2016 07:08 AM
You can definitely script it. If you look at the out of the box Computer one, it gives you idea how to do it:
if (source.operating_system == "AIX" ||
source.operating_system == "HP/UX" )
target.sys_class_name = "cmdb_ci_unix_server";
if (source.operating_system == "Windows 2000 Server")
target.sys_class_name = "cmdb_ci_win_server";
basically it's
if (source.field-name-from-spreadsheet == "value here") < - - - from spreadsheet, column heading could be Class and choices are Firewall, IP Router, etc
target.sys_class_name = "cmdb_ci_win_server"; < - - this is table to insert into.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-07-2018 06:53 AM
Hi - can you share some more details on how you did this? How did you map each of the fields in the different classes from the source to those different target fields? Was that all in the script too?