January 13, 201412 yr Hi all! Does anyone know if it's possible to script the opening of a PDF stored in a container field in FileMaker Go 13? I've tried a couple of different techniques such as Go To Field with Select/Perform selected. I have not been able to get the PDF open without tapping the container field and selecting "View". I would rather the user not have to do that. Ideally, I'd like to have the user click a button that runs a script that opens the pdf so that I don't have to show the container field to the user.
January 14, 201412 yr I have a button on my layout that runs the OpenURL script step and I feed it the URL where my file is hosted. That loads the PDF, then you can open it in Safari if you want.
January 14, 201412 yr I have done this with a script like: -------------------------- Set Variable [$path; Value:Get (TemporaryPath ) & "myfile.pdf"] Export Field Contents [myContainerField; "$path"; Automatically open] -------------------------- The trick is making sure 'Automatically open' is selected..... The Get(TemporaryPath) function is useful for a lot of things :-) ... I also use it to create PDF reports from the FileMaker Go solution and then have it import it into a container field for viewing as above, emailing, opening in other applications etc... The script goes something like: -------------------------- Set Variable [$path; Value:Get (TemporaryPath ) & "myfile.pdf"] Save Records as PDF [Restore, No dialog; "$path"; Records being browsed] Go to Field [select/perform; myContainerField] Insert PDF ["$path"] Go to Field [select/perform] -------------------------- Hope this helps :-)
January 14, 201411 yr Author Thanks for the replies! The Get(TemporaryPath) technique worked like a champ! Thanks again to all that replied.
Create an account or sign in to comment