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

Export data as TXT file using Export Sets

siva81
Kilo Contributor

Hi All,

Our requirement is export the table data as TXT file into a Mid Server location.We are able to export the data as a CSV file using Export Sets. I would like to know is there way to export the data as TXT file directly or convert the file from CSV to TXT after exporting using post-export script? Also, I would like to know can we add one more option to the drop-down field "Format" in the export sets form? Thank you so much for your time and help in advance.

 

10 REPLIES 10

Ankur Bawiskar
Tera Patron
Tera Patron

Hi Siva,

Yes this is possible. You can use post export script and have some java code and pick that file from folder location and convert to txt. But be careful you cannot directly copy past java code in mid server script include as it is. you need to have package calls etc.

Sample java reference:

http://codegeekers.blogspot.com/2016/02/csv-file-to-txt-java-code.html

https://www.java-forums.org/new-java/46399-converting-csv-file-txt-file.html

Mark Correct if this solves your issue and also mark Helpful if you find my response worthy based on the impact.
Thanks
Ankur

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

Ankur Bawiskar
Tera Patron
Tera Patron

Hi Siva,

Any update on this?
Can you mark my answer as correct, helpful if you were able to achieve the requirement. This helps in removing this question from unanswered list and helps users to learn from your thread. Thanks in advance.

Regards
Ankur

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

Hi Ankur,

Thank you so much for your response. We have changed the requirement. Now customer wants the file to be exported in CSV format but each time with a filed value. EX. Field Name: Location, Value = NYC and the file to be exported as NYC.csv. Not with the name we give in the export sets. Is it possible to export the data like that? Please let me know. Appriciate your time and help.

Thanks

Siva

 

 

Could you please start a new thread as the requirement you have is a completely different one now.

Mark the appropriate answer as correct to close this thread.