January 15, 200718 yr 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.
January 15, 200718 yr 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.
January 15, 200718 yr 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 ?.
January 15, 200718 yr 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 January 15, 200718 yr by Guest
January 16, 200718 yr 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.
January 16, 200718 yr Substitute it out using a calc i.e. "filewin:/" & Substitute( yourNonFmPath ; [ "" ; "/" ] ; ["" ; "/" ] )
January 16, 200718 yr 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 ?
January 16, 200718 yr 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