2 Replies Latest reply on Nov 11, 2012 8:13 AM by philmodjunk

    Paste?

    beacon10

      Title

      Paste?

      Post

           I am using FMP 12.0v3 on MacBook Air OSX 10.8.2. I am trying to add specific fields from records in a found set to a new table. I can copy the records with the fields I want to the clipboard (I see that pasting into MS Word). Using the Paste command, all I get is one record. Here's the script I'm using trying to do this:

           Go to Layout ["Trng Table" (CNRA Referee Listingv1)]

           Perform Find [Restore]

           Copy All Records/Requests

           Go to Layout ["Training Hrs (Trng Hrs Table)]

           New Record/Request

           Paste [Select; Trng Hrs Table::referee]

           Commit Records/Requests []

            

           Do I need to Loop / If/Endif to enter more than one record at a time? Any help would be appreciated.

        • 1. Re: Paste?
          davidanders

          http://www.filemaker.com/help/html/add_view_data.4.23.html
          Home > Using FileMaker Pro > Adding and viewing data > Entering data in records > Copying and moving data in records

                                                                           
                              
                                    
                         
                              
                                   When you copy all the records in the found set, records are separated by carriage returns.
                         

               Your script creates one record and pastes first record into that one record.  Copy All Records would require some scripting to parse each record in a loop to achieve your goal.

          http://www.filemaker.com/11help/html/scripts_ref1.36.67.html#1030065
          Home > Reference > Script steps reference > Records script steps > Copy All Records/Requests

          Examples 
               This script finds and sorts a set of records, switches to the Data Entry layout, copies the contents of the found set to the Clipboard, switches layouts and tables, creates a new record, and pastes the contents of the Clipboard to the History field.
                
               Perform Find [Restore]
               Sort Records [Restore; No dialog]
               Go to Layout ["Data entry"]
               Copy All Records/Requests
               Go to Layout ["History table"]
               New Record/Request
               Paste [Select; History table::History]
               Commit Records/Requests[]
          • 2. Re: Paste?
            philmodjunk

                 Often a closer look at one is trying to do with such a copy and paste reveals that no such copying is needed, that a relationship can be set up that links to the data instead of copying it. This is not always the case, but when it is, it makes for a much simpler process.

                 And while Copy All Records has its uses, it destroys any data the user may have copied to the clipboard. There are other methods for moving data from one table to another that leave the clipboard data intact.