Import data to create a catalog item

ishaanvohra
Kilo Contributor

Helllo,

I want to create a catalog item by importing a CSV file.For this, I have created a import set,a source table   and transform maps.

I have created two transform maps:- First one to create a catalog item.Screen Shot 2017-10-31 at 12.56.29 PM.png

And second transform map to create variables of the created catalog item.

Screen Shot 2017-10-31 at 1.02.00 PM.png

I have created the catalog item using script in transform map and also created variable providing it the catalog item which I created.But still I cannot see any variable in the realted list when I open that catalog Item by navigating to maintain item.

Screen Shot 2017-10-31 at 1.07.55 PM.png

But when I navigate to table "item_option_new" then in that case for the created variable it diplays the catalog item relationship with it.

Screen Shot 2017-10-31 at 1.13.08 PM.png

And when I click on this catalog item then it also displays that variable in its related list.

Screen Shot 2017-10-31 at 1.15.01 PM.png

Help me out please.What is happening here?Is there any problem with my scripting?

Because when I navigate through maintain items it doen't show any variable linked with that catalog item.

But when I navigate through variable table then it shows catalog item linked with it.

Please help me out as what should I do to correct this?

3 REPLIES 3

raves12
Kilo Sage

Few ideas to troubleshoot:



1. Check if there are no duplicate catalog items created. Compare the sys ids of both the catalog items in which variables are listed and the other one to check if they are same.


2. On which field you have made coalesce "true" in the transform map while creating catalogs and variables? Check for that



I suspect it is a case of duplicate entries.


Hi Ravi,


1:- Sys Ids of both the catalog items are different.


2:- I haven't   made coalesce "true" on any field.


Sys Ids of both the catalogs are different that means they are different catalogs. In the transform map please set the coalesce as true for field 'name' or any other field as per your requirement. This will prevent creation of duplicate entries for the same catalog.



Refer this :



Using the Coalesce Field - ServiceNow Wiki