9 Replies Latest reply on Apr 2, 2014 10:46 AM by philmodjunk

    Copying records

    MichaelPoling

      Title

      Copying records

      Post

           So if I now have a functional working database, and I want to use it on two different locations, which are not connected via network, nor internet, can I send individual records from one file to another ?

           I tried exporting, but it only exported the current table record, not all the related table records.  Is there a method of exporting just a single record but having all the related table data associated with that record be exported as well?  

           Or is there a method of "syncing" the databases other than to have them on Webdirect or something?

           The other reason I wanted to do this is that I will likely edit the database at some point, tweaking here and there.  But I may not want to be onsite when I do it, and I would need a method of getting the records from the old file to the new without any mix-ups.

           What is the most reliable method of this?

        • 1. Re: Copying records
          philmodjunk

               Import records is one step shorted than export records as you can import records directly from one filemaker file into another. But it imports data from the found set of one table at a time just like export records exports data.

               But you can import or export the data from a found set of one record in table 1, then pull up the related records for that record in table 2 and export or import them.

               But "synching" data, if there is any chance that one user modified the record in one way while a different user modifies it in another way on a different copy of the database, can be a very challenging thing to set up.

               That's why 360works and SeedCode have produced 3rd party tools for synching databases. These were originally created to synch data from iOS devices using FM GO, but I believe that at least teh SeedCode tool can be used with any FileMaker Database.

          • 2. Re: Copying records
            MichaelPoling

                 Hmm...may need to look at the3rd party tools then.

                 So if I have 10 related tables, I'd have to export records from each table and import them individually ?

                 Strange...seems like something that one would want to do fairly often...like when you are working on a laptop in a remote location with no web connection or cell connection, then get back home and want to upload that data to the "main" database file, without disturbing the data already there.

                 I'll have a look at Seedcode.

                 Thanks!

                 Mike

            • 3. Re: Copying records
              philmodjunk
                   

                        So if I have 10 related tables, I'd have to export records from each table and import them individually ?

                   Yes, but you can script it so that all you do is click a button.

              • 4. Re: Copying records
                MichaelPoling

                      Ahhh, yes. And I assume that both the import AND export would need to be similarly scripted otherwise the export might save all the relevant table data, but the import would not bring it all in.

                      

                • 5. Re: Copying records
                  philmodjunk

                       But the import does not require an export. You can import from table 1 in file 1 into table 2 of file 2 all in one import records step.

                  • 6. Re: Copying records
                    MichaelPoling

                         Oh, so only new records will be imported and others ignored?  Or how does it specify which records to transfer?

                    • 7. Re: Copying records
                      philmodjunk

                           That's not what I said. I said that you don't have to use export records before you import records. That has nothing to do with whether the record in the found set to be imported is a new record or not.

                      • 8. Re: Copying records
                        MichaelPoling

                             Ok, so the import script will also have to define the records to be imported (ie. date of x or greater, or some such )?

                             I can see it eliminates the intermediate file created from exporting and importing.

                             I'll have to check out the 3rd party sync tools to see if they are easy to integrate into my solution.

                             The import seems simple enough (I say that now.....)

                             Thanks

                             Mike

                        • 9. Re: Copying records
                          philmodjunk

                               No. Both import and export records imports or exports the records in a found set. To control which records are imported or exported, your script can do a find or use other methods to pull up a found set of the records to be imported or exported.

                               There are a lot of options to explore. You can add a date or timestamp field to the table that auto-enters the current date or date, time each time that the record is modified to identify which records have been added/changed since last update.

                               There are import records options that allow you to import a record into a matching record in your found set so you can match up the record by it's primary key. And an additional option can be selected to add a new record if no matching record exists so one import can update both existing records and add new records at the same time.

                               And with this type of database setup, you'll want to use Get (UUID) to enter a primary key in each field instead of an auto-entered serial number as it will ensure that new records added in different copies of the database will each still have unique primary keys.