How to to import data from an excel sheet having multiple tabs into multiple tables in ServiceNow?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-05-2020 12:51 PM
I have an excel sheet with multiple tabs/sheets that contain test cases. I need to import the excel sheet into ServiceNow such that a Test Plan gets created and test cases present inside the excel sheet get inserted into the tm_test_case_instance table (in the related list of Test Plan). I need to import such that few fields like "Test Steps", "Expected Results", "Status" should be created inside the related list "Test" table and the remaining fields of that excel into the parent "Test Case" table. All the test cases present inside one excel file should be inserted in a single "Test Plan".
So, I need to import data from an excel sheet having multiple tabs into multiple tables in ServiceNow (Tables are --> Test Plan (Parent), Test Case (in the related list of TestPlan), Test (which is Test Steps in the related list of Test Case).
If anyone can provide the approach/ Link on how to proceed with this requirement, will be helpful.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-05-2020 01:05 PM
Hi Sue,
see below thread should be helpful to you
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-06-2020 09:19 AM
Hi
I have tried, I somehow figured I need to create one source table and two transform maps (one for Test Case & other for Test Step). Inside Test Case transform Map, I created the linkage for Test Plan ( Test Plan is created and Test case gets linked to it) and inside Test Step Transform Map, the linkage between Test Case and Test Step form is made. This linkage can be made by populating the reference field (test plan & test case reference fields on respective tables). But I was unable to create this linkage (like how to populate Test case reference field inside Test Table (test step) with Test Case Number).
There are 3 tables where I need to populate the data from the excel sheet. Few columns need to be populated into the Parent table & other into the related list table. So, once the data is populated into the respective table via a transform map, The child records are not linked inside the Parent table because the reference field of the Parent table inside the child table form is not getting populated via a transform map because all the tables are created simultaneously.
Can you please suggest here?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-06-2025 01:03 AM
i have the same requirement. Can you provide the solution?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-06-2025 03:26 AM
Hello @Sue16 ,
Kindly write a on complete transform map script on the both the child transform map to get the parent in the child records.
The script will look like below:
var grint = new GlideRecord('intermediate table');
grint.addQuery('sys_import_set', source.sys_import_set);
grint.addQuery('row',source.row);
grint.query();
if(grint.next()){
source.parent = grint.target_record;
source.update();
}
Best Regards,
Nayan Dhamane
ServiceNow Community Rising Star 2023.