5 Replies Latest reply on Feb 25, 2014 6:14 AM by philmodjunk

    Name PDFs with the job number



      Name PDFs with the job number


           I need to save a pdf of a single purchase order to my desktop and name the file with the job number (12345.pdf). The file name is "POs" and the field name is "Job_no"


           I've read many forum posts that say to use Set Variable and Get Desktop Path, but no matter how many different ways I try it, I'm still getting a pdf that's named "untitled.pdf"


           Can you help me write a script that will do this?


           I'm using FMPro 11 on a Mac

        • 1. Re: Name PDFs with the job number

               The steps in this thread should be sufficient to show you how:  Found Sets to PDF with unique file names

          • 2. Re: Name PDFs with the job number

                 I have been working on this for days, and can't get it to work. I've tried different files, different file paths, using different fields. I have followed the link above, as well as several others, and have managed to get the file to be named


                 I've attached the script that creates this result...Can you help me figure out where I've gone wrong?

            • 3. Re: Name PDFs with the job number

                   cheryl cuellar:

                   Thank you for your post.

                   In your "Save Records as PDF" script step, I see ""$filePath"".  That is, two sets of quotes.  This is why you are getting a file named $filePath.pdf.  Instead, for the File name, do not put $filePath in quotes.  See the screenshot below.

                   FileMaker, Inc.

              • 4. Re: Name PDFs with the job number

                     I must still be doing something wrong - I took out the quotes and now it names the file $filePath.pdf. I tried several other variations, and it names the file whatever I type in the Output File Path dialog box.

                     I'm trying to get it to create a pdf called Brochure.pdf by copying the text I entered in the Project field and using it to name the pdf.

                • 5. Re: Name PDFs with the job number

                       If you have FileMaker Advanced, use the script debugger and data viewer to step through your script and monitor the value of the variable to see if it is getting the correct value.

                       If you do not have Advanced, use Show Custom dialog to pause the script and display the value of the variable.

                       That way, you'll be able to see what value is assigned to the variable and that will tell us what to check next.