Load one excel for multiple tables

Lean S
Mega Expert

Hi All,

I am working on import sets and transform maps. I wanted to load one excel sheet for loading in multiple tables.

This is for loading into test case and related test case steps instance

Under test plan I have to load test cases as first step and second I have to map to test case -> test case step

so from one excel sheet 

test plan -> I have load test cases

test case -> to load its related test case steps.

How can achieve using one excel sheet. Any specific coding needed for this.

 

Thanks,

Lean S

 

 

1 ACCEPTED SOLUTION

Ankur Bawiskar
Tera Patron
Tera Patron

Hi,

From single excel file you can transform data to multiple target tables.

I assume you must be having a data source to which this excel would be attached

Define the transform maps accordingly in sequence with the Order for those target tables

1st load the Test Plan

2nd Load the Test case

find_real_file.png

Regards
Ankur

Regards,
Ankur
✨ Certified Technical Architect  ||  ✨ 9x ServiceNow MVP  ||  ✨ ServiceNow Community Leader

View solution in original post

49 REPLIES 49

Don't go to form view

open Test case table list view

and click on filter and add the filter of your test case fields and check.

Once you get a right filter which shows the test cases of any 1 test id, Then right click on the breadcrumb beside the filter and click on copy query and send me that.

Based on that we can modify the code.

Kindly mark the comments as helpful if they are helping to solve the issue.

Hi,

Below is the snapshot where is the filter of test case field which shows its related test case steps records (table2) 

find_real_file.png

 

query: tm_test_case_instance=1f28b63b1b8780107b8f1f4ead4bcba6

so this TMTT0029801 records we are creating using first transform map and now we have to automatically load its related test case steps in using 2nd transform map 

Please suggest

 

Thanks,

Lean S

Okay.

Since now we know the column name, go to your 2nd transform map. and in the mapping fields map the test case number of excel with the tm_test_case_instance (which is a reference field). Once you do the mapping, then from field mapping, only this map and there you will see another field which is 

Reference field value name: 

In this mention the name of the column of your 1st table (test case) which stores the test case number.

Then the source excel values will be mapped with the test case number and build the relationship.

'Hi Asifnoor,

But we dont have test case number in excel sheet to be mapped, because we are creating test case number in 1st transform map. excel sheet does not contain that number.

After inserting record 1st transform map we have to map this created record to test case step (table 2) insert using 2nd transform map.

 thanks

Okay.

So how many test case numbers are created in 1st transform map? And how do we know which test case step belongs to which test case?

Can you share some sample data of your excel data with 1-2 test cases and 1-2 test steps.