Naming a PDF
I want to save a record as a PDF, send it to a file path that is a folder on a share drive and give it the name of a field in the record. Please help. I just can't get the name of the record on the file.
I take it you are running a script to save the record as a PDF?
If so you want to set the file path and file name in a variable before teh Save Records as PDF step and then reference that step when saving the PDF.
So the basic steps would be:
Set Variable [ $FilePath; Value:"File:Network/File/Path/" & YourFileNameField & ".pdf" ] Save Records as PDF [ File Name: “$FilePath”; Current record ] I hope this helps
I hope this helps
I am almost there, but am having trouble defining FilePath. I think I have the Value correct. The record is identified by the field "Company", the file (table) is "Sales" and the drive that I want to save it to is "P" on our server in a folder called "Payroll Quotes".
Each time the sales team creates a quote I want to save it as a PDF so that if they make changes I have a copy of the previous record.
Thanks again for your help.
A good tip to help work out the exact file path is to click 'Specify output file' in the Save Records as PDF script step and click Add File in the dialog and navigate to where you want to store the file, make up a name and click 'Save'.
This will then give you the full path, you just need to remove the file name and paste the whole thing into teh $FilePath Variable and then calculate your file name.
Does this help?
Still having problems - I feel so close. Here is what my script looks like:
Go to Layout ["Quote Records" (Sales)]
Set Variable [$P; Value: "Filewin:/P:/Payroll Quotes/" & Sales::Company & ".pdf"]
Save records as PDF [Restore; No Dialog; "PDF"; current record]
The result is that is saves it to the P drive in the folder Payroll Quotes, but does not give the PDF the Company name as the name of the PDF.
Thank you for your posts.
Create a folder on your local drive (C: drive?) named "Payroll Quotes". Change your Set Variable command to use the C: drive instead of P: drive, leaving everything else alone. If the file is created successfully on the C: drive, then there may be some permission issues on the P: drive.
Also, make sure your Sales::Company field has information in the field. If so, make sure there are no slashes, return, or other characters that may interfere with the path name.
Create a new table (TEST) with one text field (INFO) and one record (TEST). Duplicate your original script, but change the Set Variable step to use this field. Try it with the C: drive first, and then the P: drive.
Retrieving data ...