Skip to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

How to produce clean exported text?

Featured Replies

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

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.

  • Author

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.

The steps I listed in my first post are to be used AFTER you use Export Field contents.

  • Author

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?

Sbg2 said:

File>Open

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

z_OpenFile.png

  • Author

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

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

  • Author

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.

Create an account or sign in to comment

Important Information

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

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.