Jump 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.

Export With Line Feed Characters

Featured Replies

I am searching for a FM Plugin or perhaps a stylesheet that will allow me to export a a single field containing fixed length data to a file that will contain a LF character at the end of each line.

Prior to version 9, I as able to do this because I could store the LF character in a calculation and insert that into the field data prior to exporting the single field as Tab Delimited (only 1 field means no tabs).

Now however, FM 9 will no longer allow me to insert the LF character into a calculation. It auto-replaces the LF with a CR which throws a small kink into my automated processes.

My current workaround is to insert a pipe character at the beginning of each line (following line 1) so that there is a pipe character immediately following each CR. I then manually do a find/replace to add the LF characters. It works, but I would prefer to not have this extra step if possible.

Any ideas?

An XML export can do this. There are style-sheets around that either do it, or could do it with little modification.

Look on the FMI web site.

  • Author

My thanks to Mr Vodka (offline) for suggesting the idea of using a stylesheet and my thanks to Vaughan for pointing me in the right direction so that I could locate the required stylesheet.

For anyone interested here is how I got it to work. Download:

http://transfer.filemaker.com/collection/XMLExamples.zip

Open the "custom_delim.xsl" stylesheet file.

Scroll to the bottom.

Change the newrecord variable delimiter from a Carriage Return to a Line Feed character.

Save and close the file.

Edit filemaker Export script step by changing the export file type from Tab Delimited to XML, and when prompted, point it to the "custom_delim.xsl" stylesheet.

Run the export and and voila! It works like a charm!

  • Author

New question:

Is it possible to store the XSL stylesheet in the Export script step itself? Or does it have to be an external file? If this is possible, how would I format the data so that it will work?

It has to be an external file. But you could keep the file in a container, or even in a text field, and export it to a known location before doing the "real" export.

  • Author

Thanks Comment, that is a good idea.

I remember seeing that done before in a Nightwing Demo for FMP 9 features (Dialog box as I recall) ... I'll look that up for reference to get this working the rest of the way.

I will try to take time to post what I did for that as well in case others are interested in the read once I'm done.

  • 11 months later...

Hi and thank you in advance...

How would I make this work if I needed to insert an CRLF at the end of each line?

I am using FMP 9.0 on a Mac (which typically doesnt like LFs).

dp

Edited by Guest
added information about platform

You can put the two characters in the variable "newrecord". Like this (difficult to post here), but works if you do it twice:






Edited by Guest

Create an account or sign in to comment

Important Information

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

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.