Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Open PDF from Container automatically

Featured Replies

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.

 

 

 

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.

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 :-)

  • Author

Thanks for the replies!

 

The Get(TemporaryPath) technique worked like a champ!

 

Thanks again to all that replied.

  • 4 years later...

Hi,

any reason why i get an operator expected error in line 1?

Create an account or sign in to comment

Important Information

By using this site, you agree to our Terms of Use.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.