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.

Display pdf & other data files

Featured Replies

I would like to create something like the following:

Calibration 123456

The above text needs to have button attributes so that when clicked it opens an associated PDF document.

I tried using the open file option in the button script menu but this tries to open a FM file.

Looks like you need 3 fields:

The following example will display a pdf file that is named "Calibration 123456" and located at the root of the C drive in the CalcImage field. Double-click that field to open the image.

1. FileName - Text Field - Calibration 123456

2. FilePath - Global Field - Contents: filewin:/C:/

3. CalcImage - Calculation Field - FilePath & FileName & ".pdf"

Set Calculation result to Container.

  • Author

Many thanks for the prompt reply.

I just tried your suggestion but the container just shows the complete path and does not do anything when double clicked.

I note that when adding a pdf into a straightforward container that the file has to be a reference to allow double clicking. Does this also apply to a calculated container ?.

I have attached a file which describes both the standard file placement and a calculated file placement.

You will have to change the filepath and filename(s) to reflect your system.

I hope this helps.

CalcImage.fp7.zip

Edited by Guest

  • Author

Thanks for the info. I tried this out last night at home and again this morning but the pdf just would not open. However when I changed the back slashes to forward slashes in my file path it worked. This is curious as windows paths are always delimited by a back slash. This could be very awkward as I need to use cut and paste to enter path names. Any ideas ?

Also your solution creates the pdf file in a container that includes the icon which I do not want. I guess what I am aiming for is a scrollable list similar to a portal with this sort of information:

pdf icon - calibration may 2006

pdf icon - calibration june 2006

pdf icon - calibration july 2006

The pdf icon just shows it is a pdf file and may be a repeating field. The text "calibration may 2006" needs to act as a button to display the may 2006 pdf file. Or the pdf icon could do the same thing, this may be more logical.

Substitute it out using a calc

i.e. "filewin:/" & Substitute( yourNonFmPath ; [ "" ; "/" ] ; ["" ; "/" ] )

  • Author

It seems strange that I should need to use a calc for such a fundamental operation. Has this anything to do with the platform that the database was created on in the first place - are you using windows ?

Yes i am using windows and a) I'm pretty sure its a standard C path, and : this way it uses the same path on both Windows and Mac -- hence it's a cross platform application... It's more of a URL format e.g. file:///C:/Documents and settings/... etc. or http://fmforums.com

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.