4 Replies Latest reply on Sep 1, 2010 8:52 AM by philmodjunk

    Container Field to open a pdf



      Container Field to open a pdf



      I am trying to setup a button where on a button click, a pdf document opens in its own application. Other postings on the web lead me to believe that this can be done with a container field. I am using Filemaker Pro 10 Adanced. However, this solution will be a standalone executable. 

      My understanding is that the buttons script should be:

      Go to Field [Select/perform; tablename::containerfieldname]

      Two questions:

      Is the notion of using a container field in this way accurate?

      If so, HOW?

      Here is what I am doing currently:

      Put container field on layout, inserted my PDF into the container.

      Created a script mentioned above in bold.

      Assigned script to button.

      When I click on the button a black box appears around the field, but instead of a PDF I get a sound recorder.

      Any advice? 

        • 1. Re: Container Field to open a pdf

          When you insert the PDF file into your container field, make sure that you select "Store only a reference to the file" in the "Insert File" dialog box. Your script should then work.




          • 2. Re: Container Field to open a pdf

            If you don't choose to store a reference, use export field contents to open the file instead. Using the right scripting, you can export the file to the temporary items folder so you don't have an issue with leaving exported files behind after they've been opened in this way.

            • 3. Re: Container Field to open a pdf

              Thanks for both the replies, it turns out that may not have been the issue. I switched PDF viewers (from foxit to adobe) and now it appears that the pdf does not actually go into the container field, but the layout on which the container resides. I click the container field and then click insert but it doesn't seem to insert it.

              Let me ask a broader question and maybe I could get some feedback.

              This layout has a bunch of buttons that print various reports. The reports are layouts with text and some parts auto fill with specific information from the record. These pdfs are simply static documents that they would like to print with some of the dynamic documents, and really they are there as a reminder to print them and nothing more. Is there a better way of doing this? (Aside from telling the person to bite the bullet and try to remember to print them ;) ) 

              If not, how do you insert PDFs at design time? Do these docs need to be inserted for every container field of every record? Any advice would be useful... 

              • 4. Re: Container Field to open a pdf

                If you want data to appear with every record--whether it be a PDF file or any other type of information, you have several options--none of which require you to insert the same information over and over for each record.

                You can use global fields to display such information. A global container field, for example can be used to hold your PDF file (or a reference to it's location) and then placing this global field on your layout displays the same PDF file for all records.

                You can use a related table. This option sometimes works better in shared databases and can give you the option to link your data to sub groups of all the records instead of one field for all the records.

                You can place a web viewer on your layout and use it to display the first page of your PDF document. This web viewer can give you the same view of the same document on all records if you want.