AnsweredAssumed Answered

Exporting Field Contents to a txt file that is pipe delimited issue

Question asked by tkakavros on Mar 28, 2017
Latest reply on Mar 30, 2017 by tkakavros

I have a client where I need to generate a pipe delimited txt file. I am currently looping through a data set and writing to a field. Then exporting the field as a txt file. This procedure was working fine until my clients vendor changed the import method on their system. I understand what they are saying in regards to a CR vs a NL but I am not sure how make filemaker work this way.

 

The easiest way would be to be able to export the data set as a pipe delimited txt file. But I do not think FileMaker is capable?

 

Here is the response I am receiving from their tech support. Any help would be greatly appreciated!

 

Outlined below is the issue we are seeing with the way your file is built and why it continues to be rejected.

 

Looking closely at the byte output of the file, the data outputted is correct; but in the incorrect format.

 

Instead of writing a single byte, two bytes are getting written and instead of writing a  new line they are writing a carriage return.  CR = \r NL = \n.

 

Provided below is an analysis of the byte dump of the file.

 

0000000 377 376   9  \0   3  \0   2  \0   1  \0   |  \0   1  \0   \0

0000020   4  \0   9  \0   1  \0   |  \0   6  \0   6  \0   4  \0   2  \0

0000040   9  \0   .  \0   4  \0   3  \0  \r  \0 0  \0   6  \0   6  \0

0000060   7 \0   2  \0   4  \0   | \0   2  \0   0  \0   1 \0   7  \0

0000100   0 \0   3  \0   2  \0   5 \0   |  \0   2  \0   0 \0   1  \0

0000120   7 \0   0  \0   3  \0   1  \0 9  \0   |  \0   0  \0   1  \0

0000140   : \0   2  \0   0  \0   : \0   1  \0   4  \0   | \0   2  \0

0000160   2 \0   1  \0   3  \0   6 \0   4  \0   |  \0   1 \0   |  \0

0000200   F \0   A  \0   S  \0   T \0      \0   T  \0   R \0   A  \0

0000220   C \0      \0   M  \0   A \0   R  \0   A  \0   T \0   H  \0

 

The text marked in RED is the summary record in the file.

9321|12491|66429.43

 

Below is an example of how we would expect to see the data reported. The numbers are obviously different, but the essence of what we want is the same.

 

0000000   3   8   5   | 5   4   3   |   3 7   6   2   .   1   7 \n

0000020 5   8   3   7   1   4 |   2   0   1   7 0   2   1   1   |

0000040 2   0   1   7   0 2   1   1   |   2 2   :   4   8   :   5

0000060 4   |   3   6   6 5   9   2   4   0 |   3   6   6   5   |

Outcomes