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

records not getting inserted in Data import

mp_10
Tera Contributor

@Ankur Bawiskar 

Hi Ankur,

Please guide me on the below query. I am trying to import csv file using Catalog item by following the blog you have created. Somehow the data is not getting inserted. Attaching the screenshot for your reference. Could you please guide me on this.

 

sm10_0-1680522106925.png

 

1 ACCEPTED SOLUTION

@mp_10 

are you sure the file is getting copied to that data source.

All steps are explained in detail in that blog

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

View solution in original post

7 REPLIES 7

Ankur Bawiskar
Tera Patron
Tera Patron

@mp_10 

if you are following my blog then it should work fine.

please debug by checking if data is getting inserted into import set table or not

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

mp_10
Tera Contributor

@Ankur Bawiskar 

Thank you so much for the reply. 

I have checked and noticed that it is not getting inserted to the import set table. Could you please help me with this. I am not sure what I need to do for this error.

@mp_10 

are you sure the file is getting copied to that data source.

All steps are explained in detail in that blog

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

Hi @Ankur Bawiskar ,

I have created a workflow like you have mentioned in the blog and after begin then 'Run Script' with the below code 

GlideSysAttachment.copy('sc_req_item',current.sys_id,'sys_data_source','8fdb29ef97f9a51004d4fef3a253af99');

then the timer and 4th step again Run Script with below code.

var schImp_GR = new GlideRecord("scheduled_import_set");
schImp_GR.addQuery("sys_id", "25607d27973da51004d4fef3a253afc3");
schImp_GR.query();
if (schImp_GR.next()) {
SncTriggerSynchronizer.executeNow(schImp_GR); // this is for non scoped app
}