9 Replies Latest reply on Apr 7, 2012 5:34 AM by pantarhei

    How can I export field names when exporting to a tab-delimitted text file?

    thewoz

      I'm looking for an easy method to export field names as the first line in tab-delimitted text files. I routinely export tab-delimitted files which I then process using Perl scripts. My Perl scripts are looking for a tab-delimitted file with field names in the first line and no text delimitters such as quotes, around the field names or any of the data. As far as I can see, FileMaker can only export field names to merge files (.mer), Excel files, dbase files, and htm files. I don't want to have to pre-process the files in other software, so Excel, dbase, and htm files are not an option. The problem with merge files is that they use commas to separate each field and they double quote the contents of each field but not the field names. I could add steps to my Perl scripts to replace the commas and double quotes with tabs but it would be simpler to do all of this in FileMaker. At least it would be simpler if I could figure out an easy way to do it. My current work around is to have a separate text file that contains only one line which has a tab-delimitted list of all of the field names. This is inconvenient as I need to manually copy this field-header file into the exported data file and I need to revise the file any time I change the field order or the number of exported fields in the exported data file. I'm surprised that FM does not have more robust export features such as an option to export field names in the same file format as the data and the ability to select or de-select a text qualifier (quotes or other symbols such as |). Perhaps there is a simple way to do this that I am not aware of. Any suggestions would be appreciated.

      Karl