3 Replies Latest reply on Mar 12, 2014 1:47 PM by philmodjunk

    Open file container form field

    Maikel

      Title

      Open file container form field

      Post

           In my filemaker solution I use container fields to store documents. (through the script below). I have already tried to load te file location by opening a document form a container field. but the solution is not complete. 
           In my ultimate situation, the document for example, a Word document can be stored after edit in the application MSWord and automatically update  in the container field. 
            
           does anyone have any tips?

      Screen_Shot_2014-03-12_at_17.15.20.png

        • 1. Re: Open file container form field
          Maikel
          /files/8608c24d84/Screen_Shot_2014-03-12_at_17.31.03.png 513x301
          • 2. Re: Open file container form field
            Maikel
            /files/0cb7f5d4b8/Screen_Shot_2014-03-12_at_17.31.14.png 515x291
            • 3. Re: Open file container form field
              philmodjunk

                   What you want isn't really possible from a container that has external storage specified. You have two options that I can suggest:

                   a) Don't use an externally stored container field. insert your files with the "store a reference" option. Then double clicking the container field will open the copy from it's location in your computer's default application for that file type. (MS word documents should open in Word). This can create as many problems as it solves as you need to insert the files from a shared directory that is accessible to all database users via the same exact file path (This can be a problem if you have both mac and windows users)

                   b) Add a "save" button to your layout where you run this script to open a copy of the file in the Temporary folder. The save button's script would use Insert File to insert the file exported to the Temporary folder back into the container field so that FileMaker can replace the externally stored copy with this new copy. All you need do is add a dollar sign to $$final_path so that it is now a global variable so that the file path in it persists. Then your "save" button's script can use this variable to find the file and re-insert it into the container field. The key draw back here is that your users now have to save their changes twice: once in MS Word to save their changes back to the copy in the Temporary File and a second time to save that copy back into your container field.