3 Replies Latest reply on May 11, 2011 8:16 AM by philmodjunk

    Copy and paste in a table

    CarlosLeon

      Title

      Copy and paste in a table

      Post

      Hello

      I would like to know if it is possibble to copy a paste a group of data in the same table.

      I have to introduce new records in a table (150) and most of the data is a copy of an existing data, only have to change one field.

      Now I have to duplicate the 150 records one by one and after change the field

      Thanks and best regards

        • 1. Re: Copy and paste in a table
          LaRetta_1

          Hi Carlos,

          There are ways to handle this ... looping and duplicating, exporting then importing etc but I need to understand the purpose behind the request to properly advise.  Usually if there is only one field which would change then it is going against general relational theory and could best be handled with a related table or potentially a multiline in that single field.  It will also help to understand your FM version here.

          • 2. Re: Copy and paste in a table
            CarlosLeon

            We work with relational tables in this way:

            Table 1:

            Product      Description

            Product1    Product type 1

            Product2    Product type 2

             

            Table 2:

            Product     Machine

            Product1   145

            Product1   150

            Product1   175

            Product2   145

            Product2   150

            Product2   180

             

            And we have a report this way:

            Product   Description        Machine

            Product1  Product type 1  145

                                                 150

                                                  175

             

            My question:

            Many times, a new product goes throught the same machines except one or two, so I want to copy the machines of the product1 in table 2 and paste again in the table 2. Then just write the "Product2" in the first field.

            Dificult to explain.....

             

            We are working with approach and now we need to change and we are testing diferents databases

             

            Thanks

            • 3. Re: Copy and paste in a table
              philmodjunk

              You shouldn't need to copy any data from table 1 to table 2 to get the report you need.

               

              I suggest at least three tables for this:

              Products (table 1) ----<Production>-----Machines     (---< means one to many )

              Products::ProductID = Production::ProductID
              Machines::MachineID = Production::MachineID

              With this structure, you can use Production to log what product (and how much, and on what date/shift) is manufactured on a specfic machine.

              Your report can be a summary report created with a layout based on the Production Table. Fields from Products and Machines can be added to this layout in order to provide additional information such as the product description field.