3 Replies Latest reply on Jun 18, 2012 6:47 AM by philmodjunk

    Opening attached documents directly from FM?



      Opening attached documents directly from FM?


      Hi all,


      I recently bought FileMaker and am having a problem, but I don't know if it's me not fully understanding the program (I am new to any of this) or if it's just not possible.  I started off using the "Research Notes" template, as it seems to fit my first project.  In it, I have the ability to drop documents in to it which is great.  I tried adding a PDF for example, but I cannot double-click it to launch it easily.  It seems my only option is to export it to say my desktop, and then load it?  Is there a simplier way?  This seems a bit cumbersome.


      Thanks for any help someone can provide!

        • 1. Re: Opening attached documents directly from FM?

          What OS are your using? Mac or Windows?

          When you drag and drop, you store a binary copy of the file in the container field. When you use Insert PDF or Insert File from the Insert menu and select "store a reference"--a check box in the dialog box that pops up--the resulting file reference entered in the file should enable you to open the file by double clicking it.

          If you want the binary copy in the container field, you can set up a script that exports the field contents and opens the file for you. In addition to exporting to the desk top, you can export to temporary items so as not to clutter up your computer with exported copies of your files.

          • 2. Re: Opening attached documents directly from FM?

            Hi Phil,


            Thank you for your quick response!


            I was playing around on both Mac and Windows.


            Okay when I ended up doing was dragging and dropping the PDF in to the field, so it sounds like it's stored inside of it, and like you said I will need a script to export/open it.  Now that I know this is possible, I'll look in to that specifically.


            Out of curisoity, if I use 'Insert PDF' it is simply linking to the PDF on my system?  So if I delete that seperate PDF file or move it to a new location on my system, I will no longer be able to open it, correct?  In that case, I think I will have to store a binary copy and export with a script.

            Thanks again for your help!

            • 3. Re: Opening attached documents directly from FM?

              Insert PDF and Insert File can either insert a copy of the file or they can insert a reference to it. As I stated in my last post, you can click a check box titled "store a reference". If you select that option, you are inserting a reference and renaming or moving the file will break the connection and you won't be able to view or open the file from FileMaker's container field where you inserted the now out of date reference.

              Set Variable [$Path ; value: "file:" & Get ( TemporaryPath ) & "PutFileNameexpressionhere" & ".PDF" ]
              Export Field contents [Yourtable::YourContainerField ; $Path ]

              Will export the file from the container field to your temporary items folder. There's a check box that you can select with this script step that will atuomatically open this file once it is exported.