I’ve been struggling with creating a .txt file using the dataset.getAsText() function in combination with plugins.file.writeTXTFile().
I need to export a specifically formatted text file where each field (each row only contains 1 field in the dataset) occupies a new line in the .txt file, thus:
FIELD CONTENT
FIELD CONTENT
FIELD CONTENT
FIELD CONTENT
There should be no delimiter for the fields.
I am using the following code:
var txtFile = dataset.getAsText(null,'\n',null,false);
but the .txt file, when opened in notepad looks like this:
FIELD CONTENTFIELD CONTENTFIELD CONTENTFIELD CONTENT
Anyone have any ideas? Not sure what (if anything) I am doing wrong.
Yeah, its formatted to be read by one of our business partners automated systems and contains important account info, their system rejects inproperly formatted files.
This solution is currently running in Filemaker but we are migrating it, so it would have been a pretty big show stopper…