Exporting to windows applications impossible due to linefeed/carriage return handling? Problem with DHL-Intraship

Discussion created by thirdsun on May 9, 2012
Latest reply on May 9, 2012 by thirdsun



I need my solution to be able to talk to DHL Intraship. Unfortunately Intraship expect quite a complex CSV-file in order to accept any data. Well, it's not really CSV, but a pipe (|)-separated format and within this file there are different types of datasets like shipments, receivers, senders and packages. Those types are set with a certain text field within the set like "DPEE-SHIPMENT" or "DPEE-RECEIVER" etc. Because of these type defining strings and an additional ID in every line there is no need to keep those datasets structured or in the right order. However there needs to be at least one set of every required type in order to get a complete shipment. Furthermore every dataset, regardless of its type, needs to be separated by line ending/carriage return.


After some research this requirement seems to be impossible to deal with when you use FileMaker on a Mac since linebreaks in tab-separated exports are only correctly handled when separating FileMaker-datasets. Since I have to adjust to the requirements of Intraship and use a "|" as value separator and different types of datasets within one file the only way to generate such content is a complex calculation field that parses the data as needed. That field should be the only one being exported. Here comes the deal breaker though: Linebreaks within calculations (or any other FM-field) are exported as vertical tabs that won't be recognized by most windows applications. I can fix this by hand in a text editor and just insert correct returns, but since this export/import is going to be a daily task manually converting the file is not an option.

Also changing the encoding options for the export script step don't seem to change anything.


The only way to get correct line returns when exporting FileMaker data is to use tab-delimited text while your datasets in FileMaker already have to represent the content of any given exported line. Since the lines Intraship expects could be any kind of data type (again, this could be either shipment-data, receiver-info, sender-info, parcel-data - there are more but those are required), I would have to store all of those different information in the same table but different datasets - e.g. 4 datasets in the table "DHL DATA" - each of them with 3/4 of its field empty and useless. This is a useless and overly artificial data structure.


Being able to communicate with old windows applications is likely a rather common need of FileMaker developers. How do you deal with this when carriage returns aren't recognized? Is there any other solution I'm missing in order to solve my particular problem?


I'm using FileMaker Pro Advanced 12 on Mac OSX Lion 10.7.3


Thanks for your time.