7 Replies Latest reply on Jun 28, 2012 12:28 PM by Stephen Huston

    Inconsistent behaviour with containers in FM12

    k-meson

      I am in the process of converting a database from FM11 to 12 which contains object embeded items in container fields. The system basically takes a copy of a PDF letter that is created and posts it into the container as part of the process of sending a letter out to customers. There are legal reasons why this needs to be a PDF copy rather than nsimply a record that can reprint the letter.

       

      So of course I am having to update my scripts to change the insert object to insert PDF or Insert File. However I am having some dfficulty with making this work consistently, and have tried to set up external data storage for a new container with again very variable results. These are the issues I am getting:

      • Existing embedded files in the old container open in Acrobat Reader/Word etc. when I double click which is the action I want to replicate
      • If I insert a new file into the same container it sometimes allows me to double click it and sometimes it does not? This is using the insert file option either in a script or on the layout with RHMB.
      • The new container is set as interactive and to use external storage. Insert PDF into this container from RHMB displays the PDF in interactive mode but DOES NOT put it in external storage.
      • If I insert file into this new container it does put it into external storage but does not allow me to open the file with a double click and does not view the content interactiveley.
      • If I change the filed type to non interactive and insert file it puts it into external storage but again does not allow double click opening.

       

      The main question I have is why does it work sometimes and not others (with exactly the same file)? Are there any definitive notes that will give me the details I need to script my document insertion (preferably into external store) and consistently be able to open it from the stored document without having to export the contents to a file first?

       

      To me it seems as though FileMaker have taken away a useful feature with the object embedding functionality and have not adequateley replaced it with the interactive container capability, which is also limiting as you again cannot opt to open the file in it's native application instead of viewing it in a filemaker container object on the layout (which means it has to be a large object on screen to have any real use).

       

      Anyone agree with this or think I have missed something? Anyone have any advice re: how to get consistent behaviour from containers?

       

      Many Thanks

       

      John Wilson

        • 1. Re: Inconsistent behaviour with containers in FM12
          wimdecorte

          k-meson wrote:

           

          • The new container is set as interactive and to use external storage. Insert PDF into this container from RHMB displays the PDF in interactive mode but DOES NOT put it in external storage.

           

          There's a lot of different issues list in the post but I wanted to pick this one out.   In this scenario, you're saying that the PDF does show in the container (you can see it is there) but although the container field is set up to use external storage, it is not stored externally?  How did you verify that?

          Are you using secure or open external storage for that container?

          • 2. Re: Inconsistent behaviour with containers in FM12
            k-meson

            Hi - I am finding this is now working - which is what is confusing me as it definiteley was not before!

             

            It was verified by viewing the file folder and seeing no files being added. It is set up in open format so each file can be opened directly if required.

             

            John

            • 3. Re: Inconsistent behaviour with containers in FM12
              k-meson

              Just to add to my brief response earlier.

               

              When I originally set this up, I did not set the store externally on the container field and added in a number of PDF files which displayed correctly in interactive mode. I then changed the storage to external and it ran the move content wizard but reported that it could not move any content as they were OLE? Which I though was no longer supported. BUT - I inserted these new PDFs using the FM12 interface so am a little confused.

               

              The database is now consistenly placing newly added files and PDF's into the external store when they are added, but if it is not a PDF file displaying interactiveley it does not allow you to open the document by double clicking as per the old container object.

               

              I am also unable to copy the content of the original container in to the new one - it simply copies a thumbnail image rather than the actual content!

               

              I need a container that can accept a variety of document types and will allow the stored document to be opened in it's native application or alternative viewer either through a double click action or scripted event. And if I cannot easily convert the existing container to export all it's current content to external storage (which it will not do because they are all "objects") I need to be able to copy the content to a new container, not just the thumbnail image! Can anyone shed any light on how this may be achieved?

               

              Thanks

               

              John Wilson

              • 4. Re: Inconsistent behaviour with containers in FM12
                Stephen Huston

                Keep in mind that, though Open Storage lets you see the container contents as separate files, they may not be safely opened and edited in that location or the database may consider them "tampered" with. Storage, both Open and Hidden, is still aprt of the database, and should never be directly opened/edited via the OS.

                 

                Open storage container contents can be safely copied from that location to another location, then edited outside of the storage structure.

                However, the edited copy has to be reinsterted into the container field via FileMaker's layout interface, not via the OS file structure of the Open storage files, or the data will be considered "tampered" with by FileMaker, which might even result in file corruption down the road.

                • 5. Re: Inconsistent behaviour with containers in FM12
                  k-meson

                  Stephen

                   

                  Thanks for the note on that - though I was only viewing the storage folder to check that files were actually being stored there as there is no indication of whether they are or not from the FM interface as far as I can see.

                   

                  Any thoughts on the file open from container inconsistency I am getting? I can insert a file (the same one) five or six times into the same record and it will not open from the container with a double click. I can insert again and it will!

                   

                  John

                  • 6. Re: Inconsistent behaviour with containers in FM12
                    Stephen Huston

                    We have used a button on the container to run an Open URL script step, using a calculated URL string based on a filepath field auto-entered on import/insert.

                    • 7. Re: Inconsistent behaviour with containers in FM12
                      Stephen Huston

                      And I think the original filepath (not storage) may be available as part of the Get as Text results returned if the function is applied to a container now in 12.