7 Replies Latest reply on Oct 29, 2009 12:19 PM by LeoCA

    Save PDF files to a container field.

    LeoCA

      Title

      Save PDF files to a container field.

      Post

      We create a container field for Invoice Table that has Invoice Number as key. This field is meant to store Invoice Supporting documents (in pdf, doc, xls,...).

      We copy the file(s) and paste to the field on a Invoice Layout. It seems working. Before we release to general users, we like to have better understandings:

       

      1. Any good sources about using container field?

      2. Are files stored in the database file (.fp7) or using reference? Will it affect performance?

      3. How easy is to port this information from one FM database to another FM database?

      4. Does FM have better way to meet our needs(other than the way we do now)?

       

      We are using FileMaker Pro 8.5.  Your help is appreciated.

       

      LeoCA

       

        • 1. Re: Save PDF files to a container field.
          philmodjunk
            
          LeoCA wrote:

           

          2. Are files stored in the database file (.fp7) or using reference? Will it affect performance?

             If you copy and paste, the file is stored in the filemaker file. If you use Insert | Object... you're given the option to store as a reference if you want. Files that are very large may affect performance.

           

          3. How easy is to port this information from one FM database to another FM database?

              Any data in any filemaker field can easily by imported into another filemaker field of the same type using Import Records. If the file's reference is stored then the reference information (it's a file path) is imported and the new copy will be able to access the referenced file only if the file path remains valid in the new file. Be careful if you plan to share the file over a network or publish it to the web. Any store by reference files have to physically reside in specific locations in order for all users to be able to access the file.

           

           

          • 2. Re: Save PDF files to a container field.
            LeoCA
               Thank you for the response. I was away for a few days and not able to response. We have tried the file reference approach and have the questions: 1. How do we know the file path? Is it stored in the database? This is for viewer, not the one who stored the file. 2. To use file reference, we need to put files on certain location that FileMaker have access first. Is there a way for general users to save the file from their local machine to the location and do file reference at the same time? Your help is appreciated. LeoCA
            • 3. Re: Save PDF files to a container field.
              philmodjunk
                

              I haven't had to do this myself. The following information comes from reading other posts and the documentation that comes with Filemaker.

               

              If the database is hosted over a LAN, the save by reference files need to be stored in a location that is accessible to all users with the same file path for all.

               

              One example in the windows world is to put all these files in a directory and then share it over the network. You would configure each client machine to map this folder as a networked drive with the same drive letter in all cases.

               

              If you want to see the paths in a given store by reference container field, the easiest way I know is to define a calculation field that returns text:

               

              cContainerPath  :  YourContainerFieldName

               

              Place this field on a layout next to the container and resize it to be several lines of text tall. In browse mode, you'll be able to see the file path data and format used when the document was inserted. You'll find they follow the same format as external data sources listed in Manage | External Data Sources...

              • 4. Re: Save PDF files to a container field.
                shudder
                  

                Just want to chime in with a bit of info (A caveat perhaps?) on the use of file references:

                 

                We had the need to view JPG files in a DB that had many thousands of records in it.  While the original programmer could have put these JPGs directly into the container fields, he chose to do it by file referencing as the JPGs were sometimes pretty large (up to 1MB each) and he was concerned the DB would get sluggish (rightly so!).  As PhilModJunk states, we did this via an open-to-everyone storage area on an xserve, with file references in the container field pointing to those remote files.

                 

                This system worked very fine... until we had to move the data files from the original location on the old xserve to an NFS-based storage machine -- that move broke all the file references and none of the JPGs showed up after that!  Yikes!  The only way we could get around this was to spoof the original path, which was not a lot of fun to set up.

                 

                CAVEAT ON MY END: This old system was built in FMP 5.5.  Perhaps FMP 10 (or 8.5!) will be easier to handle in this regard (don't really know form personal experience as yet -- we retired the old system before I converted everyone from FMP 5.5 to FMP 10 this year...). 

                 

                Best of luck. 

                 

                - shud 

                 

                 

                • 5. Re: Save PDF files to a container field.
                  philmodjunk
                     In FMP 10, you can actually use a script to edit the file references in the container fields. Thus, you could use a script to perform a "mass update" on the fields after re-locating the referenced files.
                  • 6. Re: Save PDF files to a container field.
                    shudder
                      

                    ^^  Good to know!  That would have made life a lot easier. 

                     

                    - shud 

                    • 7. Re: Save PDF files to a container field.
                      LeoCA
                        

                      Thank you for all great input!

                       

                      Is there a way to upload files to system defined location (server side folder) and insert file reference on container field at the same time when general users saving documents?  We are dealing with invoice supporting documents, which may run several MBs. Save contents directly to container will make DB too big to perform efficiently.

                       

                      Thanks.

                       

                      LeoCA