Matt Klein Posted January 13, 2014 Posted January 13, 2014 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.
Agnes Riley Posted January 14, 2014 Posted January 14, 2014 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.
Sky Willmott Posted January 14, 2014 Posted January 14, 2014 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 :-)
Matt Klein Posted January 14, 2014 Author Posted January 14, 2014 Thanks for the replies! The Get(TemporaryPath) technique worked like a champ! Thanks again to all that replied.
Gismo12 Posted November 13, 2018 Posted November 13, 2018 Hi, any reason why i get an operator expected error in line 1?
Recommended Posts
This topic is 2258 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now