How to update data using transform map
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-14-2023 02:39 AM
I have a requirement where I need to update the network type of different CI classes.
I have a transform map running on cmdb_ci table but I dont find network type in cmdb_ci table but I see it in cmdb_ci_netgear.
How to I use the transform map and update the same?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-14-2023 05:26 AM
A right, my mistake. You don't need to use a source script, but a onBefore Transform script.
Help others to find a correct solution by marking the appropriate response as accepted solution and helpful.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-14-2023 07:20 AM - edited 09-14-2023 07:23 AM
I am sorry, It is still not updating !!
I see the target table is still cmdb table and no update happening in netgear table

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-14-2023 07:37 AM
The target table should not change, because you are using the .ref_cmdb_ci_netgear. to dotwalk to the right table.
It might be that this is not possible this way in a transform map, and only in Business Rule for example.
In that case I would suggest to use @Vishal Birajdar's solution.
Help others to find a correct solution by marking the appropriate response as accepted solution and helpful.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-14-2023 07:24 AM
So you can use onBefore transform script and determine the class and then set the type
(function runTransformScript(source, map, log, target /*undefined onStart*/ ) {
// Add your code here
if(target.sys_class_name == 'cmdb_ci_netgear')
target.u_network_type = ''; // give here the correct choice valuef or the target choice field
})(source, map, log, target);
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-14-2023 07:35 AM
Tried this by removing coleace, It is creating record in ci table, but not updating