2 Replies Latest reply on Feb 3, 2010 1:19 PM by philmodjunk

    Naming Exported Record Files



      Naming Exported Record Files


      I am interested in creating a script that will export a set of found records into Excel format.  I would like to include in the name of the exported file, the date the export was performed (i.e. "Archive Dec 01, 10.xls").  Is there a script that I can use that will concatenate a value (e.g. "Archive") with a field value (e.g. "Dec 01, 10") to achieve the desired result?

        • 1. Re: Naming Exported Record Files

          You have to create a variable filename and then use that.


          For example in your script:


          Set Variable $filename ; "Archive_" & Substitute(Get(CurrentDate);"/";"-") & ".xls"

          Exports Records ; $filename 

          • 2. Re: Naming Exported Record Files

            Set Variable [$Path; Value: "File path expression you specify" & get (filename) and MonthName( get ( currentdate ) ) & Day ( get ( currentdate ) ) & ".xls"]


            Now enter $Path as the export record step's Output File.



            To get a leading zero on your day number, you will have to add some more code to do that for most typical system settings.

            There are a number of get functions you can use to help build the file path to the location where you want to export the file.