June 26, 200817 yr 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?
June 26, 200817 yr 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.
June 26, 200817 yr 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!
June 26, 200817 yr 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?
June 26, 200817 yr 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.
June 26, 200817 yr 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.
June 23, 200916 yr 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 June 23, 200916 yr by Guest added information about platform
June 23, 200916 yr You can put the two characters in the variable "newrecord". Like this (difficult to post here), but works if you do it twice: Edited June 23, 200916 yr by Guest
Create an account or sign in to comment