5 Replies Latest reply on Jun 11, 2014 12:01 PM by DLarsen

    Copy Paste Behavior Change

    DLarsen

      I just updated from FM11 to FM13 and I'm seeing a change in the way data behaves when pasted into a field. This difference may have been present in FM12 as well, I just don't know because we skipped FM12.

       

      FYI: This is a Windows only solution and the source of the data is a Word document that contains a table which contains 3 columns and a varying number of rows.

       

      This is how it works: The user manually opens a Word doc, highlights and copies any number of rows to their clipboard. Then they paste the contents of the clipboard into a global field. Later a script parses the text and creates a new record for each row. This worked fine with Filemaker 11 but fails under version 13.

       

      In Filemaker 11 after pasting the text into the global field it looked like this:

       

      Blue Red Green

      Left Right Center

      High Medium Low

       

      In Filemaker 13 it looks like this:

       

      Blue Red GreenLeft Right CenterHigh Medium Low

       

      The carriage returns are gone. Since CRs are the characteristic that I use to differentiate one record from another the script fails to create the records properly.

       

      Any ideas how to fix this problem?

        • 1. Re: Copy Paste Behavior Change
          flybynight

          Just a shot in the dark:

          Are the CRs actually gone, or perhaps is it getting changed to some other "invisible" character? If so, you could check for that character instead. How does it look when you paste it into a generic text editor?

           

          I occasionally have to do something similar, going from Word to InDesign. If I copy table text from Word and paste into InDesign, I end up with an embedded graphic, which does me no good for formatting. If I first paste it into a text editor like BBedit or TextWrangler (Mac), it comes over as an array with CRs and tabs. Then I can re-copy it and it will paste like that into InDesign.

          Not exactly the same, but another work-around that I have used.

           

          Laters,

          -Shawn

          • 2. Re: Copy Paste Behavior Change
            user19752

            Seems to be a bug, removing all tabs but holding CRs in cell.

            (The line end also seems to be 'tab' in Word table.'Goto next cell')

            Try Ctrl+Shift+V to paste it.

            This removes text styles but holds tabs.

            • 3. Re: Copy Paste Behavior Change
              DLarsen

              Hello Shawn,

               

              Thanks for the text editor suggestion. When I paste from the Word doc into Notepad++ I can see the tabs and the CR/LFs so it looks ok.

               

              I also found a workaround similar to yours.  If I paste from Word into Excel and then copy from Excel into Filemaker it works fine. It's clunky but better than typing it by hand.

               

               

              User19752,

               

              I tried pasting with CTRL + SHIFT + V but still no joy.

               

               

              Lastly, I'd like to report this as a bug but I've scoured Filemaker's website and can't find where bugs are reported other than that public forum.  Could this be right?

               

              -Doug

              • 4. Re: Copy Paste Behavior Change
                taylorsharpe

                Unfortunately, it really isn't a bug.  The clipboard is actually an amazing tool that takes information from many various sources and stores it, usually in several formats, and tries to make it available to paste into even other applications.  Better control of your clipboard on how it handles such things at CR/LRs is probably what you want.  ClipManager Express from myFMButler does a lot to improve connectivity between FileMaker and the clipboard.  I would try their product and see if that helps.  But I bet Shawn got it right by mentioning that there probably are invisible characters such as Char ( 10 ) that is actually there and you're just not seeing it.  You can try a Substitute ( Field ; Char ( 10 ) ; Char ( 13 ) ) and that may break things the way you want.  10 is Line Feed and 13 is Carriage Return.  Or some other combination of invisible character maniuplation may work. 

                • 5. Re: Copy Paste Behavior Change
                  DLarsen

                  Hi Taylor,

                   

                  I cracked open my old copy of FM11 and substituted Char (13) with the pipe symbol and I got all of the substitutions I was expecting but in FM13 the same function has no effect. Clearly FM11 and FM13 behave differently with this pasted table data so I'm going to continue to call it a bug. Maybe because the whole method of rendering layouts changed in v12 this isn't possible anymore. Maybe. I just wanted to let FMI know that this is different and unexpected behavior.

                   

                  -Doug