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.

Save PDF and Filepaths - Cannot create on disk

Featured Replies

Filemaker Server 12 (windows) and Filemaker 12 workstations and laptops coming in to filemaker through a VPN. A couple Mac laptops

 

We have a script that Saves as a PDF and then opens an email program and attaches the PDF. The script sets a variable to name the PDF and a variable to set the File Path. All good at times. Sometimes it works and sometimes we get the error: Unable to create PDF on this disk, disk is locked or make more room etc....

 

 

FM = Fileserver

Service Reports = Shared Directory on Fileserver

 

Then there is a variable that sets the filename. 

 

The output File directory uses the variable $filepath (a variable that is the combination of path & name)

 

What am I missing?

 

Thank you for any assistance!

 

 

Post your actual script (print to PDF) because you probably have an error in the file path definition.

  • Author

Post your actual script (print to PDF) because you probably have an error in the file path definition.

Thank you!

 

I thought it was working but then someone with windows 8 got an access denied.

Email pdf scripts.pdf

I'll assume that you are in the correct context, that is that you are on a layout based on "Service Tickets" table occurrence.

 

The thing that looks a bit suspicious is the use of quotes in the Attachment section of the Send Mail step.

 

Do you have FMA and can you tell me what $filepath equals right before the Save Records as PDF step?

 

Also, a full remote (windows) path should be filewin://computerName/shareName/directoryName/fileName

  • Author

I'll assume that you are in the correct context, that is that you are on a layout based on "Service Tickets" table occurrence.

 

The thing that looks a bit suspicious is the use of quotes in the Attachment section of the Send Mail step.

 

Do you have FMA and can you tell me what $filepath equals right before the Save Records as PDF step?

 

Also, a full remote (windows) path should be filewin://computerName/shareName/directoryName/fileName

   $filepath equals $path$file $path(filewin:/Service Reports/ ) $file("MDIS_ST_" & Service Tickets::Ticket Number & ".pdf")

I did try the full remote windows path & that didn't work at all.... Odd

Sorry, what I meant is show me what the variable equals, not what you're setting it to (that I see in your script). Run the script with the debugger and capture $filepath.

 

Could be a permission issue. Can you copy a file from this workstation to that directory?

  • 4 weeks later...
  • Newbies

I'm also having this issue - Same configurations (FM 12, FM Server 12, Windows 7). I know there is not an error in my file path because the same user can save the PDF when using remote desktop or any computer directly connected to the network. Saving the PDF is ONLY a problem when a client is connected through VPN. Any ides?

  • Newbies

Hi there,

 

Not sure in your scenario whether you are also appending the files, but we were having a similar issue where 'save and append as pdf' to a network location was returning the same error.  If one user had the error come up, another user could perform the same action and it work just fine - so the path was correct.  I just found a possible answer on this forum from a member named VickyNesbit from Aug 2012, which reads:

 

"We all use networked accounts here - save and append PDFs to the network account and this error will pop up intermittently - I'm guessing because the server is busy backing up the newly created PDF at the same time that FileMaker is trying to append to it.... Or something like that anyway...

Amended script to save everything to the temporary folder (which is local) using Get ( TemporaryPath ) - it works sweet as a nut every time!"
 

I have very high hopes that this will resolve the issue in our environment, I hope it helps you too  :flowers:

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.