Assets bulk upload with out import set.

Manoj prabakar
Tera Contributor

I need to Create a button using ui action,  then when i click it need to pop up a excel format to upload the bulk data. without  import set it need to transform data to respective table.  can anyone guide me what to do .

3 REPLIES 3

YaswanthKurre
Giga Guru

hi @Manoj prabakar  ,

 

 You can create a UI Page that allows users to upload an Excel file, parse it on the client side , and send the data to a Script Include via GlideAjax. The Script Include would then handle inserting the data directly into the target table. This method is flexible but lacks visibility, error tracking, and reusability.

 

It's highly recommended to use Import Sets with Transform Maps. This approach gives you full visibility into uploaded data, allows for error correction before transformation, and supports logging and auditing. It's ideal for repeatable processes , especially when dealing with large datasets.

 

Thanks,

Yaswanth

Vishal Jaswal
Giga Sage

Hello @Manoj prabakar  

I would advise not a good practice (specially with critical tables as Assets) as inserting or updating data via ServiceNow way is better as it handles duplicates out-of-the-box. 

However, if you still want to develop such functionality then I would recommend to first try in your PDI:

1. UI Action: to call UI page via GlideModal (pop-up).
2. UI Page: This will have submit button and calling script include.
3. Script Include(client callable): Parse the uploaded excel file and then insert the records into the table.


Hope that helps!

Ankur Bawiskar
Tera Patron
Tera Patron

@Manoj prabakar  

why would someone import assets via Excel directly and why you don't wish to use transform map etc?

Another way is to ask them to upload csv or excel and then use CSV or Excel Parser and handle the data load

CSVParser - Scoped 

GlideExcelParser - Scoped, Global 

If my response helped please mark it correct and close the thread so that it benefits future readers.

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