8 Replies Latest reply on Oct 7, 2014 9:18 AM by FilmUser

    Pasting text but preserving field font



      Pasting text but preserving field font


      I have a database where I have two very large text fields side by side. The left side contains a draft chapter of my novel, the right side will hold paragraphs I want to revise. The right hand side is defined to have a different font and colour from the left hand side, so it stands out as distinct and different.


      The problem is, when I paste from left to right, the pasted text is in the font and colour of the left side, and overrides the right field's definition. This is even after setting the right side's Format / Control / Behaviour / Input method to "synchronise with field font". 


      I wouldn't mind so much, but in FMP 10 there is no button or script command to set a field format such as font or colour. Is there ANY way I can paste from one field to another and have the pasted text change to the font and colour of the destination field? This is driving me mad.

        • 1. Re: Pasting text but preserving field font

          I can tell that you are a Mac user. This doesn't happen in Windows XP systems as the paste action is specified as "paste unformatted text".

          Here's the simplest fix:

          Open Manage | Database | Fields. Find this text field and double click it to open field options. Now select the auto-enter tab and enter this calculaiton as an auto-entered calculation:

          TextFormatRemove ( self )

          Then clear the "do not replace existing values..." check box.

          • 2. Re: Pasting text but preserving field font


            At first I thought it hadn't worked, but as soon as I clicked outside the field after pasting, it reformatted to the field definition. YAY.

            It's a real shame that FileMaker doesn't offer this as a standard format option instead of having to find out that it's an obscure (to me) calculation. After all, this is a 50:50 thing.

            • 3. Re: Pasting text but preserving field font

              I have also found that if you press "apple Z" (like an undo) immediately after pasting the text, the formating is removed (on Macs).  The calculation Phil mentioned is the better option for fields where you will be pasting into often as you are, but for the occasional use the other method works for some.  It would be nice if Mac users had the "paste as unformatted text" option too.  (already submitted as feature request by me Smile)

              • 4. Re: Pasting text but preserving field font

                On windows, "paste unformatted" is the only option--so windows users sometimes complain about losing the reverse capability.

                And if you are wondering how to post a feature request: Feature Suggestion Form

                • 5. Re: Pasting text but preserving field font

                  Mark - I tried Cmd-Z immediately after pasting : it undid the paste!! Are you sure you meant that?


                  Phil - I will post that feature request. And yes, I quite understand about the 'reverse capability', as for me it's a 50:50 thing; sometimes I want the originating format preserved, other times I want it to take the format of the receiving field.

                  • 6. Re: Pasting text but preserving field font


                    Yes that usually works.  Though most of the time I have that issue is pasting from a different application, like Mail or Word (Acrobat is especially frustrating as it does remove formating but also removes spaces and CRs) .  I will have to test that out and see if it applies pasting from one field to another in the same file.

                    • 7. Re: Pasting text but preserving field font

                      I'm experiencing a similar problem, we copy and paste from a Word document in to FileMaker and it keeps the format of the Word document overriding the field format, is the best way to correct this as above?


                      Many thanks

                      • 8. Re: Pasting text but preserving field font

                        As Phil says, the calculation he listed works always for me.

                        The Command / Control "Z" option always works too, but you must hit Command / Control "Z" (undo) IMMEDIATELY after pasting the value in, as in while the curser is still blinking. It removes the application of (the copy source) text formatting, which is the last step in the paste. If it removes the pasted values, then no foreign formatting was applied.

                        At least this is my experience, Mac or Windows 7.