Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

Display pdf & other data files


This topic is 6522 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

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.

Posted

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.

Posted

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 ?.

Posted (edited)

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
Posted

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.

Posted

Substitute it out using a calc

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

Posted

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 ?

Posted

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

This topic is 6522 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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

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