Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

This topic is 6492 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

Hopefully, this is an easy one. As shown in the screen copy below, FileMaker inserts "non standard" carriage returns in text exported under WinXP. The file was produced by right-clicking on a text field and selecting Export with the filename of Untitled.txt -- and then opening with Notepad.

Is there a simple way to either 1) instruct FileMaker to insert proper CRs during the export operation or 2) replace FileMaker's carriage returns in the text field itself with proper carriage returns before requesting the export?

I've seen this issue discussed as part of more complicated data cases, but no one seems to have clearly addressed this simplest case.

Thanks in advance for any help.

ExportResult.png

Posted

In FileMaker:

File>Open

set Filter of Type to Comma Seperated (.csv, .txt)

Select your text file.

Export records to a new text file and the proper CR's will be used.

The file size will also be about half the size of the original export as using Export Field Contents puts an extra character between each character exported (use a Hex editor if you are curious).

You can also try an XML export with a Style Sheet but I can't help you there. I see people say its easy but it seems anything but to me.

Posted

Right clicking on a text box and selecting Export Field Contents doesn't give me any option as to the file type, so I will guess you are suggesting a scripted export. I'll give that a try over the weekend.

Thanks for your response.

Posted

After repeated tries, I was unable to make any progress using your suggestion. For simplicity's sake, I used the right-click field export for the example in my original post. What I'm actually trying to do is build a script to export the contents of a single text field. The Open File script step requires a FileMaker file and I found no option for a simple text file.

Did I interpret your suggestion correctly?

Posted

What I'm actually trying to do is build a script to export the contents of a single text field. The Open File script step requires a FileMaker file and I found no option for a simple text file.

This is what is I'm seeing at the script-level dialog. Is there some other option?

Export.PNG

Posted

Apparently the Open File script step and manually using the menu command File>Open do not work the same. My previous directions were for a manual import, I missed that you were trying to script it until just now.

I have attached a file showing how you might get the export you want through scripting. Two things to note:

1) when saving your file use the extension in the filename (ie. "MyExportTextFile.txt" not "MyExportFile").

2) Because filemaker does not give you the option to export straight text you must use a different format. The Save As Type you specify will mean certain characters can not be exported. For example - If you choose the .tab format you can't export tabs.

z_MyMultiLineFieldExport.zip

Posted

First of all I want to say THANK YOU for sticking with this.

Using your scripts as a model, I've been able to achieve the result I was looking for. I trust others will benefit from your contribution, as well. It's somewhat of a shame that we have to do this kind of thing in the first place. I'm often amazed at some of the things FileMaker can do -- and, in this case, can't do. I appreciate it when folks like you take the time to show others how to bridge these gaps.

Anyway, it works ... and thanks.

This topic is 6492 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.