6 Replies Latest reply on May 14, 2012 11:46 AM by Mike_Mitchell

    Importing from a filemaker file


      I've been using Filemaker for several years, but one thing I've never been able to figure out is as follows:

      When importing from a table in an external Filemaker file, how reliable is it to assume (yes I know what it makes out of you and me, lol) that all the records in the from table will be imported. Probably 99% of the time, all records are imported, but I know I have had a few occasions where that has not been the case. It would be nice to understand what factors affect this, so that I can understand it and plan accordingly. Current using FMPro 8, 11, and 12, but I suspect that whatever it is that causes this hasn't changed.

        • 1. Re: Importing from a filemaker file

          The main factor in determining if all records in a table are imported is if the source FileMaker file is open or closed when you start the import.


          Importing from a closed FileMaker file will result in importing all records from the source table.


          If the source FileMaker file is open, then the current Found Set of the most recently visited layout for that table will be imported.  I think this is the recipe.


          When in doubt, close the source FileMaker file before doing the import.



          • 2. Re: Importing from a filemaker file



            Closing a file may not always be possible, for example if any relation to this file exists.

            To make sure all records are being imported go to a window of the file to import andperorm a script that contains "Show all records", otherwise just the found set will be imported.



            • 3. Re: Importing from a filemaker file
              Stephen Huston

              It also matters whether the files in question are hosted or being used in local/single-user mode. When hosted, you will generally get all records from the source, sometimes even if the file is open in another window with a less-than-all found set.


              In single-user mode with the files on the local disk, the latest found set may affect the import. I think this was fixed after the FP7 file format so that importing from a closed file will import all, but I recall with some older versions it only imported the found set which was active when it had been last closed if being used as a local file. I started building a Show All records into the onFileClosing script so that the files would always open/import the full record set.


              If you want to import only a found set in a Hosted environment, it is sometimes easier to export the found set to a local FMP file, and then run your import from that local file.

              • 4. Re: Importing from a filemaker file

                I tend not to assume - ever - that I have the right found set from opening a file cold. I open the file and verify it, either manually or via running a script in that file.


                But that's me ... paranoid, and proud of it.   



                • 5. Re: Importing from a filemaker file
                  Stephen Huston

                  Belt and Suspenders, again. 


                  I agree, been surprised too many times by unexpected found sets to assume such can be scripted without performing some processes  in both files before the import.

                  • 6. Re: Importing from a filemaker file

                    There's one other benefit I've found, too, which crops up if you have multiple imports to do from the same source file: If you open it first and leave it open, you only have to authenticate once.


                    Paranoid ... and lazy.