Bulk creating data in a table

Passion_of_SNOW
Tera Contributor

How can I bulk create Taxonomy Node in the spm_taxonomy_node table without Transform map? 
The sample data is below - 

 

Name ParentService Portforlio
Business Digital
Shared & Corporate Digital
WorkplaceBusinessDigital
Customer ServiceBusinessDigital
Manufacturing & DeliveryShared & CorporateDigital
Product ManagementShared & CorporateDigital
4 REPLIES 4

Tanushree Maiti
Kilo Patron

Hi @Passion_of_SNOW 

 

refer these Servicenow Documentation links:

Service Portfolio Management taxonomy 

       Create taxonomy layer definitions 

       Create taxonomy nodes 

 

 

 

Please mark this response as Helpful & Accept it as solution if it assisted you with your question.
Regards
Tanushree Maiti
ServiceNow Technical Architect
Linkedin:

Where does it say how to create them in bulk? 

 

You can bulk load any table via XML or XLSX.  From list view right click on the column header then select Import.  Import external data into "class" table - Click Create Excel template.  You can choose Insert (no Sys ID) or Update (Sys ID) and Include all fields in the template - check box.

 

Create Excel template to create .xlsx
Choose File to select xlsx to Upload.

 

I had to load my taxonomy in groups to get parents in before the children.  I'm SURE there is a better way!  Good Luck.

Niamul Arifin
Tera Expert

write a fix script something like below. This wont create any import set, transform map while importing records in spm_taxonomy_node table.

 

var nodes = [{name:'Business'},{name:'Shared & Corporate'}]

for (var i = 0; i< nodes.length; i++){
var node = nodes[i];
var grInsert = new GlideRecord('spm_taxonomy_node');
grInsert.initialize();
grInsert.setValue('name', node.name);
grInsert.insert();
}