6 Replies Latest reply on Apr 7, 2014 9:39 AM by philmodjunk

    Separation Model: Updating data file

    jmmx

      Title

      Separation Model: Updating data file

      Post

           OK - So I have successfully updated to the Separation Model. As I work remotely for my clients, they have a "real" copy of the data file and I have a dummy copy. Since I work mostly with the interface module this is fine. 

            

           However, when I need to change the data file tho presents potential problems as I build/test on my local copy of the data file.

           So - my question....

           After having made changes to my copy of the data file, is there some easy way to update the real copy? Or do I need to go in and add new table fields and relationships by hand?

        • 1. Re: Separation Model: Updating data file
          philmodjunk

               Use a script with a series of Import Records steps to import all the data from all the tables in the old copy of the data file into the new. Set up the same script to update any auto-entered serial number fields' next serial value settings as well. Before running this script, do a Show All Records on each layout of the old copy of the file to make sure that all records are imported from each table by this script. (this can also be scripted.)

               Then you can close the data file on the server so that no users can make any changes to the data. Run the import data script. Then replace the older file on the server with the new copy that has all the imported data.

          • 2. Re: Separation Model: Updating data file
            jmmx

                 Phil - thnks for the reply.

                 Wow.This could be a painful process! 

                 Why can't FileMaker provide a function Update Data Model, that would merge 2 DB files? I could imagine that it would not let you rename relations, but aside from that, it seems to make more sense for one group to solve the problem once, rather than having every user need to solve it again and again.

            • 3. Re: Separation Model: Updating data file
              Jade
                   

              Why can't FileMaker provide a function Update Data Model, that would merge 2 DB files? I could imagine that it would not let you rename relations, but aside from that, it seems to make more sense for one group to solve the problem once, rather than having every user need to solve it again and again.

                   RefreshFM fills this gap if you can afford it.

              https://www.goya.com.au/refreshfm

              • 4. Re: Separation Model: Updating data file
                philmodjunk

                     A script to pull all the data from file1 into file2 isn't really all that complicated--especially since you can select the steps that import data from one table into another and use the duplicate button in the script editor to duplicate the steps and then you can simply customize the field mapping and other details. Once you've done this successfully for a single solution, it becomes pretty straight forward to do it again.

                     I've developed a standard scripted method where the user simply clicks a button in the new database copy and an open file dialog appears. The user then select the older version of the file in the dialog and clicks open. The script imports all data from all tables in the selected copy of the file. Since I have this script in one database file, I can use Manage | Scripts to import the script into a new solution and then edit the script to manage the specific details for the new database file.

                • 5. Re: Separation Model: Updating data file
                  jmmx

                       So then  - aside from trivial changes - It is best to import data into the modified development version rather than try to update the live data file?

                        

                  • 6. Re: Separation Model: Updating data file
                    philmodjunk

                         In almost all cases. Trying to modify the live file is very much like trying to change the spark plugs of a car while someone else drives it down the freeway. surprise

                         The exception is when you need to make trivial changes and you can access the DB at a time when no one else is accessing it such as before or after business hours. Even then, you may want to close the file on the server, pull a copy over to your local machine use FileMaker Pro or (much better) FIleMaker Advanced to modify the file and then put it back up on the server. Making changes to the data level of your file, should there be a "network glitch" at just the wrong instance, risks possible damage to the file.