6 Replies Latest reply on Oct 29, 2016 11:11 AM by martinsorich

    File Container Issues on FileMaker Pro 14 Upgrade

    Matt.Cox

      Hello,

       

      We are currently undergoing a transition from FileMaker Pro 11 to FileMaker Pro 14.  In testing, almost everything functions correctly on the transition, except for the file containers.

       

      In FMP 11, we used "insert object" to store our PDFs directly into the database, which would allow us to double click on them and open directly into Adobe Reader.  That functionality is gone from subsequent versions of FMP, but I am having trouble with any of the various new options for file storage in FMP 14 working with our system.

       

      The interactive setting for the container boxes makes it so that I would have to increase my thumbnail size containers to much larger fields to be able to see the PDF options (save, print, etc.).  It's doable, but it seems to take longer to load the pages, and we are not looking to review the PDF in the page, just reprint it in most cases.  It then becomes unusable, because when I do try to print from the interactive file, it will not let me change any of the print options or even cancel the print.  The only buttons I can click are print or help, which does cancel it but opens a web page for adobe help.  I updated to the latest version of Adobe Acrobat DC (as of 2/15/16) as I read that FMP is now using plugins from Internet Explorer to see if that would fix the issue.  It did not change anything.  I also checked and the database does not have any plugins installed.

       

      So, I switched the fields back to non-interactive containers and started trying things to see if I could find an acceptable way for this to work.  My first try was to leave the container as holding the PDF directly in the database entered by using the "insert file" option and not checking "store as a reference".  Double clicking does nothing, but more interestingly if I try to export the field contents, it removes that it is a .pdf file and saves it as an unspecified file type.  To fix this, I either have to type the .pdf into the save field or add it to the file where it was saved.  We don't only save PDFs in these fields, ruling out script exporting and not everyone at the company is highly computer literate, so I need to have my database as foolproof as possible.  I don't understand why it is losing the file type on exporting, when it even shows the file type as the picture of the file in the container and the .pdf in the container's file name.

       

      I tried to switch it over to storing it as a secure external file using the FMP secure folder, which did nothing different. 

       

      The "store as a reference" checked does enable double clicking to open the file directly in Adobe, but has issues with us having to store the files at a central location that everyone would be able to save to and see.  I would rather not do this because, again it is not foolproof, and I need these files to be more secure than saved on a shared file folder (one of the main reasons we moved to FMP).  Even with this setup, if I try to export the field contents, it does not save the file type.

       

      I don't understand why the files saved in an external file through FMP's secure storage versus "store as a reference" would react differently on double clicking, since they are both effectively acting as shortcuts to a file.

       

      Thank you for any support you are able to lend.

       

      Matt

        • 1. Re: File Container Issues on FileMaker Pro 14 Upgrade
          TSPigeon

          Matt:

           

          Thank you for your post.

           

          "Insert Object" basically left you with Windows OLE Object in the Container. FileMaker Pro 12 and newer do not support OLE Objects. The most convenient process I have seen customer's go through is to create a script to export all of the container fields into a folder with FileMaker Pro 11 and then reinsert the files with FileMaker Pro 14. I believe you'd want to use a Loop and possibly keep a field to track the path of the file for reinsertion. I'm sure the developer's on here would have more information and maybe better options -just thought this tid bit might get you started.

           

          TSPigeon

          FileMaker, Inc.

          • 2. Re: File Container Issues on FileMaker Pro 14 Upgrade
            Matt.Cox

            Hello TSPigeon,

             

            Thank you for that suggestion on exporting the files from FMP 11.  I had not noticed that the OLE objects were not able to be opened or copied, as I was focused on adding and exporting any new files that were added.

             

            Any idea why my new files are not saving the file type?  Or is it possible to have a script that checks the file type and adds it for the save?

             

            Thank you,

             

            Matt

            • 3. Re: File Container Issues on FileMaker Pro 14 Upgrade
              TSPigeon

              Matt:

               

              You may want to use (potentially on a calculation field):

              GetContainerAttribute( source_field ; "filename")

              It should return the file name, including the extension.

               

              TSPigeon

              FileMaker, Inc.

              • 4. Re: File Container Issues on FileMaker Pro 14 Upgrade
                Matt.Cox

                Hello,

                 

                I have looked into it further and have hit issues with the suggested corrections.

                 

                Because I have windows OLE objects, it will not let me export the field contents, nor will it get a file name from the object.  I also attempted in FMP 11 to convert the files, but it does not give any options to convert them to anything further.

                 

                is this just something that is not possible to correct without someone opening and saving the files from each record?

                 

                Thank you,

                 

                Matt

                • 5. Re: File Container Issues on FileMaker Pro 14 Upgrade
                  Matt.Cox

                  For anyone who ends up having the same issue on upgrade and stumbles upon this forum, here is the only solution that I was able to do to be able to resolve issues with Windows OLE objects in file containers.  I had several thousand files and was able to do them reasonably quickly using this method.  It is more useful if the file type that was entered as a windows OLE object is all the same, but can still be utilized with mixed files on

                   

                  First, you need to download a macro program that is able to capture mouse movements and key clicks.  There are several free reputable macro programs, or if you are concerned with those, there are purchasable programs available.  Many macro programs are set up to be simple for a user that, so choose based on your capability.  I always would recommend that you check with your IT group, if you are not the IT group, to verify that the installation is not going to be problematic.

                   

                  Next, make a folder to be able to save whatever files you are working on removing from the database.  I used my desktop, because I was not planning on keeping those files saved on my computer.

                   

                  Next, open your database that you are going to get the files from.  I am not sure if this was because of having a older computer or something with how our server is set up, but I had several issues until I set my file cache higher under Edit/Preferences/Memory to 256 MB.  Once you have done that, create a field that is a calculation with an output of text, = file_container_name.  You will find as I did, that it will not give you an actual file name, you will only get a "?" for any windows OLE objects.  That is actually useful in this case, because you can now do a search for "?" in that field, and it will only show your records that have windows OLE objects saved (useful for the next step).  If you have mixed file types, you will have to manually omit records to only get one of the types at a time.  I have not been able to find a way around this.  I would also recommend adding a record number or some other unique name to each record if you don't already have one, which can be used later to save the records and help with lining up the importing on a new database.  If you have several files in one record, you will have to make calculation fields for each and a macro for each.

                   

                  With your found records, You can now get your macro set up to save your files.  With my macro program, I set it to record and went through the first save of the file manually.  I had it copy my record number first, open the file (pdf in my case), save as 'paste' + add "-file1", close the window, and click the next record button and wait for the next record to fully load.  Stop the macro recording.

                   

                  I verified a couple times that the recorded macro would function on replay and also trimmed out some of the time between steps to help with the timeliness, but once you have that set, you can just set it to loop the number of files you have left and let the macro run.  The time it takes will be highly dependent on how many files you have, how quickly it was able to save each file, and free time on the computer, as you will not be able to use that computer while the macro is running.  I personally let the macro run after work hours once I had made sure there were no problems with the macro.

                   

                  Once you have the files saved, you can then create a looping script in your new or converted database to set the record number + "-file1" as a variable, and then have it import the file using that variable and move to the next record or create a new record if you are doing a new database from them.

                   

                  This is not a simple fix, and can be time consuming, but it was better than having a person doing the file saving manually, as my macro ran faster than a person would be able to go, and could run for hours on end without stopping.

                   

                  Matt

                  1 of 1 people found this helpful
                  • 6. Re: File Container Issues on FileMaker Pro 14 Upgrade
                    martinsorich

                    For anyone looking for a solution to export OLE PDFs embedded in container fields issue when converting from .fp7 to .fmp12 versions, I written a detailed blog post:

                     

                    Martin Sorich: Exporting OLE Objects as PDFs from FileMaker Container Fields using a Macro Program

                     

                    Martin