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.

Opening a PDF using calculated link

Featured Replies

I am trying to open a PDF in Acrobat using a calculated link. Does anyone know how I might approach this problem?

You will need thescript step "Open Url" Then use a field such as locationPDF=text field

locationPDF field will equal the path to your pdf file weather that be locally such as c:pdf_fileexample.pdf or http://www.mysite.com/example.pdf

so you would "open url(locationPDF)" open without dialog

Stu

  • Author

Thanks for the info. Is there a way to browse to a particular file instead of having to type it into the field?

Hi, the Troi file plugin will search for a filename and return the directory path.

On the Mac classic or OSX platform I'd use a script to find the file with the Troi plug-in and then send an Applescript/shell script command to open it in the application.

regards, jeff

  • 3 weeks later...

Thanks to suggestions from this forum before, I was able to create exactly what you're looking for without plugin help. You basically need a predictable file path (either on your local computer or a network). Then, create two calculation fields; one for Macs (using AppleScript) and one for PCs. You can then have your script detect if the user is on Windows or Mac using the Status(CurrentPlatform) function, then use the Perform AppleScript (Mac) or OpenURL (PC) on the resulting calculation field.

Take a look at the screenshot of the fields in my database. The part number of the current record is "025-6000-0014-00". You can see how my folder structure is laid out on the "NetDrive" network volume. I can post the calculations for the fields if you like.

Oops, here's the attachment.

file_path.gif

I should also mention that I have not tested this in Mac OS X. We have yet to migrate our Macs to OS X.

> Is there a way to browse to a particular file instead of having to type it into the field?

In AppleScript, just say "choose file" That gets you the standard file navigation window. When you pick a file it returns the "alias", which is about the same as "file", but a little more flexible. To convert the result to text, just say "as text" or "as string"

Ex.

tell application "FileMaker Pro"

set cell "Filepath" to (choose file) as text

end tell

"tell" block is not needed within Perform AppleScript (unless you're nested inside another apps tell block), only in Script Editor. FileMaker knows to tell itself. So all you'd need is:

set cell "Filepath" to (choose file) as text

In Troi, you'd use (look at his example files):

External("TrFile-Get FileSpec Dialog", "Choose a file:")

MDLarson, a straight Finder call will work the same in OS X. Not that much has changed.

Thanks for the tip, Fenton.

I revised my AppleScript calculation to account for common errors on the Mac OS (not having the "Engineering" volume mounted and the absence of the requested PDF). Here's a screenshot of the calculation that actually works with AppleScript (note the multiple quotation marks where needed).

applescript_calc.gif

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.