1 Reply Latest reply on Jun 21, 2010 10:49 AM by philmodjunk

    Merging databases

    katrinerd

      Title

      Merging databases

      Post

      Hello,

       

      I am have two people working remotely on the same database, and am wondering if I can merge files. I am not using Filemaker server. I think at the very least it is possible to export records from one database and import them into the other, but can't figure out how to do this. 

       

      Better yet,  I am wondering if there is any way for Filemaker to merge two databases, automatically taking the most recently updated version of all records.

       

      Any other ideas would be much appreciated too.

       

      Thanks all!

        • 1. Re: Merging databases
          philmodjunk

          You have my sympathies in advance with taking on a truly knotty issue. If you can possibly host a copy of the database so that all users can access and edit the same copy of the file, life will get much, much simpler for you.

           

          You won't have to export records before importing them. You can use filemaker to import records from the tables of one file into the matching tables and fields of the other. You can do this "by hand" by selecting Import Records from the file menu (you have to first navigate to a layout for the table that you want to receive the imported data.) or you can script this. Either way, the "matching field names" option is the quickest, safest way to insure that fields are correctly "mapped" for import since you say you have two identical copies of the same database.

           

          Managing the changes of existing records is the real headache here.

           

          You can add time stamp fields to all your tables that log the time and date a record was last modified automatically. You can thus find all such records with a modification date that is after the date of last file merge and import them with a matching records option to update the record. (Give each record an auto-entered serial number as a unique record identifier so you can use this as your "match" field.)

           

          The catch here is that with two users, any given record could be modified by both users since the last update. If that happens, you have to have a way to identify such records and to have a workable way to display both new versions and either select one version to keep or to edit a copy to "merge" the changes from both such udpated copies. The more records, tables and fields involved in this process, the more time consuming and frustrating this becomes and it all can be avoided if you can find a way to host the database so that both users can access the same copy of the file.

           

          Final notes on import records: Import records gives you a lot of different options to work with so it's a good idea to read up on it in the filemaker help system.Import records can modify a very large number of records all at once so make a back up copy of your file before using import--especially when you are first learning how to get this to work.