3 Replies Latest reply on Mar 17, 2014 1:25 PM by philmodjunk

    Importing data and preserving formatting (italics, etc.)

    PaulRosen

      Title

      Importing data and preserving formatting (italics, etc.)

      Post

           I'm trying to import some data that contains bolding and italics on some words, but now sure how to do it.

           I have control over the importing process, so I can format the file any way I want (the file that gets imported is actually generated with an external script.)

           So, is there any import format that will preserve formatting? And what should that formatting look like?

           (Currently I'm creating a CSV file and using html tags <i> and <b>. That certainly doesn't work, but there must be some way.)

           ... Alternately, I guess I could import the data like it is and write a FMP script that looks for the text <i>title</i> and replaces it with the italicized version. I'm not sure how I would do that, either.

           Thanks for any insights!

            

            

        • 1. Re: Importing data and preserving formatting (italics, etc.)
          philmodjunk

               From what source are you exporting that CSV file?

               Perhaps there is a different file format that will support the import of styled text.

               Otherwise a script or auto-enter calculation may be need to reformat the data after import if portions of the text are formatted differently from the rest of the data in the same field or for what you need in this field in other records.

               In cases where the entire field contents need a particular format and the same format for all records, you can just specify this format as part of the layout design.

          • 2. Re: Importing data and preserving formatting (italics, etc.)
            PaulRosen

                 I'm generating the file myself. I can generate any format. I would like to know what format would preserve the style information and will generate that instead.

                 Also, I thought that I might be able to fix the fields later using a FMP script, but I didn't see a script option that would take a word an make it italic. I haven't done much scripting in FMP so I might have missed it.

                  

            • 3. Re: Importing data and preserving formatting (italics, etc.)
              philmodjunk

                   I'm not sure that you can include the formatting, but you might try producing styled text in an Excel file--which is a file format that FileMaker can import.

                   What you are looking for is a function that you can use in a calculation. And there are text formatting functions that you can use in a calculation defined in the calculation portion of Replace Field contents or Set field that can take the current text and apply text formatting to it.

                   If you search FileMaker help for "text formatting functions", you should be able to pull up a list of the functions that are there. You may also find that the Text functions--which can be used to parse portions of text from a text field, to be useful as well.