2 Replies Latest reply on Apr 22, 2011 6:45 AM by raybaudi

    Need to export text and retain line breaks

    daveslc

      Title

      Need to export text and retain line breaks

      Post

      I need to export a text field, and retain line breaks in the output file.

      Any thoughts on the best way to do this?

      Should I replace line breaks (with some substution function) in the text field with a delimiter like ~ and then convert back once in the .tab file? 

      (I'd rather not have to post process the file if possible).

      Or, is there a way to do this with xml/xslt (which I have not yet learned).

      Also, is there a way to retain text formatting (bold or italic) in the export file?

      thanks

      Dave

        • 1. Re: Need to export text and retain line breaks
          ChristophKaufmann

          First of all, Plugins can do that. FMP alone can't. Plugins are extremely conventioned, but you'll have to buy them, and the machine that runs your solutions must have them installed, and they may stop working when you upgrade to a newer version of Filemaker.

          Post processing the file: your OS may have some kind of automator.

          I don't know about XML/XSLT. I'd consider a field with HTML-Code.

          • 2. Re: Need to export text and retain line breaks
            raybaudi

            "I need to export a text field, and retain line breaks in the output file. Any thoughts on the best way to do this?"

            Hi

            you can export the field contents with all its formatting and line breaks, saving it to html.

            To do that, first create a calculation field ( cYourField ) with calc:

            GetAsCSS ( YourField )

            than create a script with only one step:

            Export Field Contents [ YourTable::cYourField ; "untitled.html" ; Automatically open ]

            Note that when FileMaker opens the "Specity Output File", you'll have to:
            1) write into the Output File Path List --> File:untitled.html
            2) check the box: Automatically open file.