5 Replies Latest reply on May 31, 2016 1:07 AM by gcatnine

    Setting a FilePath into a Container field - possible?




      Can a container field with External storage be trained to learn a location of a file other than via importing?  I have a 14 GB folder containing around 28,000 pdfs each in its own folder (from a SuperContainer storage structure).  I’d like to convert this to filemaker external storage without a 14 GB import. 

      Any tricks I can employ?


      One trick that has not worked = doing a SetField on the container with the full formed path to the PDF.




      "Simplicity is prerequisite for reliability." ~Edsger Dijkstra

        • 1. Re: Setting a FilePath into a Container field - possible?

          As far as I know, no. That because is FM that manage the files.

          In any case, if you have a FM server, I suggest to perform a script on the server in which you save the container in a folder (document on the server is the best) and then reimport the file into the new container manages by FM.

          when is done is done, and your clients will not notice any performance problem.

          another faster solution, is to divide the container records in chunks and run a similar script in parallel, one per chunk (how many chunks depends hoe fast are the disks).

          • 2. Re: Setting a FilePath into a Container field - possible?

            Set field is like insert by reference ... Not what you want!



            Use insert PDF with an interactive container field but DONT Select Store only a reference

            • 3. Re: Setting a FilePath into a Container field - possible?



              I will restate my problem.  I have a 14 GB folder with folders with PDF's.  I have an FMP file that references the folders there by an ID field.  I would like to be able to link the FMP file container field to the specific folder within the 14 GB folder - which I'd like to define as the external storage location for the container data.

              Am looking for a way to create that link without the need to import all 14 GB of PDFs - eg.  import into the containers then store the files again.  Thus having now 28 GB of PDF's.  Just hoping there is a better way.




              "Compatibility means deliberately repeating other people’s mistakes." — David Wheeler

              • 4. Re: Setting a FilePath into a Container field - possible?

                I'm not completely clear on what your requirement is, but I suggest you try the following and see if it achieves your purpose:


                1.     If you use external storage, you WILL be "storing the files again", because that's how external storage works. If you are happy to maintain the stored set of PDFs you already have, then set your container field to store only a reference. This will enable you to see and interact with the PDF in your FM database, but you will have to maintain the connection between the FM field and its referenced contents.


                2.     To set up the FM records, you can use Import Folder (File > Import Records > Folder …) to import all the PDFs at once. You can specify import only a reference in the options dialog (see below). This process will create a separate record for each item imported, and each record will be linked directly to your original PDF in its original location.

                Screen Shot 2016-05-31 at 9.11.52 am.png


                Note that "storing only a reference" is NOT the same thing as external storage in FM-speak. It is a bit confusing though. Originally you had just two options for containers—embed contents within your FM file (thus making a very large file) or store a reference, as described above. In FM12 along came External Storage; this is a bit of a hybrid of both the original methods—the content is not embedded in the FM file, but there is no direct link to the imported item either, as FM makes a copy of what you import—either encrypted or not—creates its own directory—where it chooses or where you specify—and stores it there. You can then do whatever you wish with the imported item, because from FM's point of view it no longer is relevant.

                • 5. Re: Setting a FilePath into a Container field - possible?

                  Import does not mean that you have to insert the full file into FM.

                  you can just reference the file, just telling FM where the file is and that is done via the import (file or pdf) instruction.