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.

Featured Replies

I am running Filemaker 11 pro advanced and I am using the latest version of Scriptmaster. When I enter the path to the file I want to load into the container field (It is a PDF file) I get the following error:

 

groovy.lang.MissingPropertyException: No such property: pathToFile for class: Script1

Parameters:
{J:Invoices1265.pdf=null}

---Script---
Script:
File f = new File( pathToFile );
fileExists = f.exists();
return f;

 

I also tried using "/" in the path and still get the error. I also tried "filewin:/J:/Invoices/1265.pdf" and still get errors.

 

Can anyone offer any suggestions as to how I might address this problem.

post-100975-0-08066300-1400842861_thumb.

 

 

are you doing this with the Scripmaster demo file first? ???

 

pathToFile is a variable that the script is expecting.

the error message would seem to indicate you have not yet set up the function correctly

 

If you don't want to pass this as a parameter you have to populate then variable first

AND

the variable pathToFile needs to be an OS path not a FileMaker version of it....

 

something like

/Users/user/Documents/a.pdf

C:Documents and settingsUsersuserDocumentsa.pdf

 

 

so to hard code this

 

pathToFile = 'thePathToTheFile'

f = new File( pathToFile )
return f.exists()

 

 

my version is in the screenshot to show you how it might work....

and as you can see is even more Groovy.. and as Groovy explicitly returns the last result you don't actually even need the 'return'

  • Author

Thanks so much for the reply. I tried again and I still get the same error. See my screen shot.

 

Screenshot-1.jpg

thanks..

 

easy to fix

where you have the path should be the NAME of your variable pathTofile

and the path should be in the portal field exactly BELOW where it is now...

 

 

john

  • Author

Embarrasing. Yes you are right. It works but the container field returns an "unknown container object" error. My goal is to save a pdf file in a container field using a scipt action using a file path to the target field.

post-100975-0-01423100-1400915414_thumb.

 

 

then there is a bit more you are not telling us....

as you can see a PDF is in the container field from this screenshot

 

is this failing here or in a script where you are then using the function?

if so can you post a screenshot of the script

if not screenshot of the demo file

  • Author

John,

 

I truly want to thank you for all your kind support.  It is obvious that I was not articulating clearly what I was trying to accomplish.  I have an invoice app in Filemaker 11 that I was using to send invoices as email attachments (saving trees). I would save the pdf in a container field to use as a visual reference after sending the invoice. I was doing this manually using the insert object function and wanted to automate the process. I learned that Filemaker 12 has an insert pdf function so I upgraded to 12. You can see the end result in the screenshot.

 

Like you I love using Filemaker for developing solutions. Meeting fellow users like you is another great reason for using Filemaker.  Once again thanks for your help.

 

Screenshot-2.jpg

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.