The CreatorCon Call for Content is officially open! Get started here.

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

Hi Asifnoor,

Thanks a lot for your valuable time on this issue: please find below once and kindly conform that this is correct way:

because i am unable to get the record mapped correctly.

1st table:

Test plan name: its an Short description field and I am mapping to Test plan -> Number field and its working fine, its loading test cases as expected

Tc_number -> is main reference   (1st transform maps)

 

 find_real_file.png

2nd table:

In this 2nd transform map,

Below is in the test case table: Test plan will be stored in test case table like below

find_real_file.png

 

Now, for test case steps table:

As per your suggestion:

Below code I have used for mapping test case -> test case steps

And we don’t have reference of test case here for test case steps record:

In test case step table , test plan and test case is saved like this:

find_real_file.png

 

Code like below:

find_real_file.png

 

Kindly suggest

 

Thanks,

Lean S

Hi,

 

As per yoru screenshots, plz confirm the following thing

1. In your 1st table, Test plan field is a reference field and linked to 3rd table named Test plan?

2. In your excel, the column name is TC Number which contains Test Plan number TMP102020?

Hi,

 

1. In your 1st table, Test plan field is a reference field and linked to 3rd table named Test plan?

Test Plan field is a reference field in the form of short description field popping up in 1st table: Test Case table (tm_test_case_instance)

find_real_file.png

2nd table: Test Case step, Test plan is like below as grayed out:

find_real_file.png

 

2. In your excel, the column name is TC Number which contains Test Plan number TMP102020?

 

TC number is excel contains Short description which is of TEST Plan record

below is  sample form test plan record:

 

find_real_file.png

 

Thanks

Lean S

Hi,

With everything masked in your screenshots, i am not able to understand which data in your XLS is stored in which column of which table.

As i understand 1st transform map is working fine. So can you take 1 sample record of XLS and tell me each column stored in which column of 1st table? 

Also tell me the column name of Test Case number that got generated automatically in 1st table?

Is there anywhere you can do  a screenshare? Skype or hangouts ?

Hi,

Please find below:  Green for Test Case table and yellow for test case step table.

 

 

find_real_file.png

 

Kindly see above for what is exactly with columns names I am mapping:

 

Thanks

Lean S