As far as I know, there is no way for the same Save As PDF script to specify different passwords. It can specify a password, but it will be the same each time.
Hmm, it's a bit of a long shot, but maybe a third party developer has a plug in for this...
Actually, I figure out how to specify different passwords for different employee.
Please see attached image below:
- I chose "save records as pdf" from the script manager window
- Chose "Specify" of specify options; then enter the case function from for the password under security tab in PDF options.
- So when I assign this script into a button (blue circle) in the body of a record, I will be able to save the record into pdf with different password when the employee ID is varied.
- So if I have 10 employees, I will need to click the button 10 times but I won't need to type the password for each employee when I save the record into pdf.
- Unfortunately, I will need to name the file name and specify the location that I want to save myself because I cannot figure out how to write the script for the "Specify output file"
I am not sure if it is workable or not. But if anyone know how to do it. Please help!!!
And it will be alot better if I can create a script that I just only need to click the button once, and it will save all the records into separate pdf from the current found set with different password and into different location based on the employees' ID....
I went to the thread that you posted above and followed your instruction there; however, I got an error message as shown below image.
But I cannot find what I have missed. Could you please help?
$Path goes in the name box.
The text after the ; goes in the Value box.
Do not type in the ; that FileMaker puts between them once you click OK to close the specify dialog.
Great~~ It works!!! Now I can just click the button and it will save the file name based on the employee name and with specific password! Thank you~~~ You are the life saver!!!!
One more question, what if I want to have the file save in a certain location; for example, the salary folder with red circle in the attached image. Am I able to do it? If so, what should I type to replace Get (DestopPath)?
You'll need to figure out the file path to that folder.
From here, it looks like:
file: Macintosh HD/Users/MacBOokPro-Mike/DropBox/Commercial/Salary/FileName.PDF goes here
But file paths have to be exactly right and in some cases, the file path to the same shared folder can be different on different computers.
I often use the file for which I provided a download link found in the following thread link, when I have trouble setting up a filepath that will work. With it, I can put a file in the folder into which I want to save my PDF, then open this file and insert that file into the container field with the "store a reference" option specified. Then I check the calculation fields in this file to see the exact file path to that inserted file and I can copy and paste it into my file path calculations.
I see. That's a smart way to do. I will try it.