Automatically export the table data as csv/excel file and attach it in RITM

Harish27
Kilo Guru

Hi ,

I am doing bulk upload of data into custom table. I am using data source and transform map to validate the data in the excel sheet and dump the data to a custom table.

Now I want to automatically export the data from custom table as csv/excel format and attach it in RITM.?

How can i achieve this?

Any help would be massively appreciated. Thank you!

1 ACCEPTED SOLUTION

Ankur Bawiskar
Tera Patron
Tera Patron

Hi Harish,

you can use script to create csv file and then attach to RITM

refer below links on how to create file from script and how to attach

you can enhance your script accordingly.

Generate csv file with the catalog variables and attaching to RITM record

Generate CSV file through script

Regards
Ankur

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

View solution in original post

16 REPLIES 16

Hi Harish,

for that you would require mid server script include where you will have to code using java packages and javascript combination

Regards
Ankur

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

Hi Ankur,

Will there be any performance issue if the table size is large (Ex.15k-20k) records?

Thanks&Regards,

Harish M

Hi Harish,

it might take time depending on how much field data you want to push to that csv for those 15k-20k records

Regards
Ankur

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

Hi Ankur,

Am able to generate the file but.. I need to save it as csv format again.

It should automatically write in csv and attach it as a file right.?

 

Upload Data is my resultant file after export.

find_real_file.png

Regards,

Harish M

Hi Harish,

you can refer the above links it would help generating the csv file

Regards
Ankur

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