Therefore Ideas

Submit your feature requests for Therefore™!

Exporting CSV and JSON

Basically in the workflow where you export a document, we need the option to export the CSV not just XML files.

  • Guest
  • Apr 6 2018
  • Shipped
  • Attach files
  • Admin
    Product Innovation commented
    26 Nov, 2019 12:20pm

    This feature has been shipped with Therefore Online v.22 and will be available for on-premise customers with Therefore 2020.

  • Admin
    Product Innovation commented
    11 Apr, 2018 11:24am

    Wonderful! Thanks for knowledge sharing! Any feedback from the field for Josh?

  • Josh Powley commented
    9 Apr, 2018 03:09pm

    For those that need the ability to export to CSV as part of existing or ongoing projects I had written the attached script a while a go to allow exporting of CSV files from a Therefore Workflow.

    If the destination CSV file already exists the file will be appended and column headers will not be re-added. It is possible to use this function with a table by putting the CreateMultiLineCSV function within a For Loop looping through the items in the table.

    To use the attached script first make sure that Scripting Safe Mode is turned off. To do this go to the Advanced Settings in the Therefore Solution Designer and change the following setting: Advanced > Security >  Scripting Safe Mode  =  False.

    All text in the attachment should be copied into the "Script" section of an "Update Index" task in Therefore 2015+ and the "Call CreateMultiLineCSV" be modified to suit your needs.

    I'm sure there's a more elegant way of achieving this but this seems to work for us.

    Subroutine: CreateMultiLineCSV
         filePath: The full file path of the destination CSV file, i.e. C:\MyCSV.csv.
         columns: Array of all of the column heading values or Array() for no column headings.
         values: Array of arrays containing all of the line column values, must be in the same order as columns.

         qualifier: Text that should be used around the values and column headings.
         delimiter: Text that should be used to separate the columns and values.


    Any feedback is much appreciated!

    Josh, IT@Spectrum Ltd