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

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

Recommended Posts

Posted

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

Posted

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?

Posted

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.

Posted

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

Posted

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.

Posted

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.

Posted (edited)

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

This topic is 6119 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.