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

Do Not Want to Overwrite Existing PDF

Featured Replies

Hi there! Any ideas out there for this one?

I have a script that Saves Records as PDFs using a filename that encorporates several fields from the record.

I am trying to create some security in the script so that if a PDF with that particular filename already exists, that it is NOT overwritten. So before the Save Records as PDF script step is intiated, I used the Insert File step with the filename to insert the file in a global container field. Then used the Get(LastError)=0 and used the Else to show a custom dialog message warning that the file exists and then exits the script before getting to the Save Records command.

It works well if the PDF file does exist...BUT if the PDF file doesn't exist yet, then the Insert File step comes up with a window prompting that the user specify a file location :) . One then has to click "CANCEL" before the script continues to generate the PDF file (which it does fine).

I am trying to get rid of this prompt for a file location or maybe there is a better way to go about this task???

Where are you saving your PDFs? Are they being saved in container fields, being referenced by a container field, or just sitting out on some server?

  • Author

Actually we have a contract with one of our customers that requires that we save a PDF of our documents that we send.

So they just sit out there on our server for the customer's auditing/backup requirements. That is just what they require.

Hence the importance of not accidentally overwriting the PDF files.

I thought about trying out the "Append" feature of the Save Records as PDF but am concerned that if our customer saw more than one copy of the document in the PDF files, they wouldn't understand the multiple copies.

Well you should be able to test if a file exists at a path with a simple command line script I would assume....

or you can check out this free plugin...

http://mooplug.com/features

  • Author

I am not certain how to script the file check other than to insert the file into a container field and then do an Insert Calculated Result for the container using a calculation of GetasText (ContainerName). Of course, this still puts me in the problem of the prompt specifying Insert File window when the file doesn't exist.

  • Author

The MooPlug works really well. I just can't believe that there isn't something from within FileMaker directly to handle it.

Yes, many of us feel that FileMaker has been very (too) slow to add "file manipulation" to the product. Now that we have script Variables allowing us to use file paths in various operations it simply cries out for this functionality. Yes, plug-ins can supply it, and some of them are free or inexpensive, and some of them are cross-platform. But really, it's almost as if FileMaker has been trying to stick its head in the sand, IMHO. David McKee, who is (or was) a FileMaker employee, released an excellent free plug-in, File Toolbox, to do this years ago, with a large range of features. FileMaker released its Example plug-in, now defunct, its name conveying how little effort expended. I'm not really angry about it, I've learned (had to) many other techniques to do these things. But really, it's time to get with the times.

I am assisting a company who has a customer also demanding access to certain items. I set up a method for them by which the customer can access information to fulfill their needs without be able to search thru the server. Personally I would not want to be controlled to that degree by a customer. You welcome to contact me directly. I have some additional questions for you.

Edited by Guest

Create an account or sign in to comment

Important Information

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

Account

Navigation

Search

Search

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.