2 Replies Latest reply on Dec 30, 2011 7:37 AM by FCallanan

    container field reference in a web viewer?


      Does anyone know how to reference a container field in a web viewer?


      What I would like to accomplish is to import faxes from 4sight fax server to a container field as a pdf then view that container field as a pdf where you can page through it?


      Though I can insert a pdf using the Insert picture script step or menu, I only see the first page. I would really like to see paging controls for containers with pdfs, but if there is a way to do this I don't see it. As a second option I was wondering if there was a way to put a reference to that container field in a web viewer and thus use the web viewer to properly display all pages of a pdf?


      Ron Smith, MD

        • 1. Re: container field reference in a web viewer?

          Hi Ron,


          There's no built-in feature to directly display a pdf that's stored in a container field within a web viewer, but there are some closely related options that should provide you with a way forward.


          Firstly, if the file in the container field is stored as a reference, then you will be able to have your web viewer retrieve the path to the file (as text from the container field by enclosing it in the GetAsText( ) function) and then use a data URL in the web viewer to display the pdf file from its location on the relevent drive or share.


          Alternativelty, if the file has been inserted into the database (rather than stored as a reference), you should be able use a script (eg triggered automatically or assigned to a button) that will pass a dynamic path to the Export Field Contents [ ] command to place the contents of the container in the local temp directory, and then the web viewer will be able to load it from there.





          R J Cologon, Ph.D.

          FileMaker Certified Developer

          Author, FileMaker Pro 10 Bible

          NightWing Enterprises, Melbourne, Australia



          • 2. Re: container field reference in a web viewer?

            Hi Ron,


            Here's a file I use to demo the sort of technique Ray alludes to in "alternatively".

            The demonstrated technique allows the display of a stored PDF in a web viewer with a browser's PDF controls. In the demo, the buttons' scripts set variables to the path of a file to display, import, or export. Such variables can then be used in the web viewer or the import/export script step.


            I hope this is helpful.


            Frank Callanan

            Camden, Maine