- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-01-2017 08:26 PM
I've searched the community but didn't really find an answer to this question.
I need to export (XML) data from 1 instance table to another instance on a different table.
I read the doc article below that says this is possible, but I can't seem to find out how.
"Note: If the data does not import, navigate to System Definition > Tables & Columns and verify that the table from which the data was exported also exists in the instance importing the data. If the table does not exist in that instance, you can move it using an update set."
Import a single XML file containing one or more records
How do I move a large amount of records to an update set?
Thank you,
Scott
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-03-2017 12:12 PM
Hello all
Thank you for helping. I was able to edit up the XML file to get it to import to the newly created table in another instance. In my case, we merged 2 custom tables into 1. This may not be best practice, but it's what we had to do to get the records over. For future references, these are the fields that had to be updated in the XML to get the table to match up. Underlined are the table names. I simply did a replace in the XML.
**NOTE - I did not do a replace on just the table name because I didn't want to affect the field names, so I made sure to copy the full XML statement I wanted to replace.
EDITS IN XML FILE
<OLD> = <NEW>
<equip_request action="INSERT_OR_UPDATE"> = <u_asset_movement_request action="INSERT_OR_UPDATE">
<sys_class_name>equip_request</sys_class_name> = <sys_class_name>u_asset_movement_request</sys_class_name>
<table_name>equip_request</table_name> = <table_name>u_asset_movement_request</table_name>
</equip_request> = </u_asset_movement_request>
I also did a CSV export/import to capture any other data to connect to the newly created fields.
This may not have been the best solution, but it was a solution that worked for me.
Thank you!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-01-2017 11:47 PM
Hi Scott,
Are the tables identical?
If so I suppose the target table in the exported xml file(s) could be edited from rma to u_asset_movement_request.
I have not actually tried that but it sounds plausible.
If they are not identical then field mappings may need to be implemented - perhaps using an import set table.
You could perhaps use the REST table api to pull the source records and write to the target with REST Table api /IREST import set api - need scripting for that which could be either on an instance or a server which could connect to both instances.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-02-2017 12:39 AM
I tried adjusting the table_name in the XML without success.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-01-2017 11:51 PM
This is not possible through xml since both the tables have different column name (I guess)
You have to export it in excel then import that excel on another instance using Data import set.
http://wiki.servicenow.com/index.php?title=Importing_Data_Using_Import_Sets#gsc.tab=0
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-02-2017 12:41 AM
I was hoping to capture the sys_id with the record and any attachments that may be attached - but alas, I think this is what I may have to do
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-02-2017 01:48 AM
Hi Scott,
Attachments wont come across with excel, only xml.
If you have copied the records across somehow, without the attachments, there is REST attachment api which could be used to pull/push the attachments across afterwards.