3 Replies Latest reply on Jun 8, 2015 12:50 PM by philmodjunk

    Save as PDF script does not work when 'Specify options' is selected

    jthulin

      Title

      Save as PDF script does not work when 'Specify options' is selected

      Post

      A pretty simple script is not working for me. I am using FMP13 Mac with FMS13 Mac. The following script does work:

      Go to Layout [“Print Layout” (filename)]
      Save Records as PDF []
      Go to Layout [original layout]

       

      When I run that script, the “Save Records as PDF” dialogue window opens and upon specifying the save options and hitting the Save button, the pdf document is saved appropriately and I am returned to the original layout.

      This script does not work:

      Go to Layout [“Print Layout” (filename)]
      Save Records as PDF [Restore; Current record]
      Go to Layout [original layout]

       

      When I run this script, the “Save Records as PDF” dialogue window opens as with the other, but when I hit Save button I am returned to the original layout without any pdf being saved.

      Any suggestions? What am I missing? Thanks much.

      Joe

        • 1. Re: Save as PDF script does not work when 'Specify options' is selected
          philmodjunk

          How do you know that no PDF was saved? could it have been saved to an unexpected location? Try enabling the option to automatically open the PDF after saving as a test.

          And there appears to be a misconception about go to layout that may or may not be part of the problem:

          It's:

          Go to Layout ["Print Layout" ; ( Table occurrence name here ) ]

          While the file's name may be the same as a table in your file and this table likely has a table occurrence name all with the same name, what is specified in the parenthesis is the name of a table occurrence, a box in "Manage | Database | relationships that corresponds with the table occurrence specified in Layout Setup | Show Records From. You can have many different tables in your file and each such table can be represented by many different table occurrence boxes in your relationship graph.

          In both of your scripts, if the layout you are on and the layout the script changes to are not based on the same exact table occurrence, your found set and current record may be completely different on the two layouts.

          • 2. Re: Save as PDF script does not work when 'Specify options' is selected
            jthulin

            Phil, thanks for your response. When I run the script I specify the save location in the Save As PDF dialogue (I have not specified an output file path in the script). I do a search for the pdf document and it comes up empty. I tried selecting the 'Automatically open file' option and nothing happens--just returns me to the original layout. And yes, you're absolutely right about specifying the table name rather than the file name. In this case, the file currently has just one table, which has the same name as the file. Wonder if this would disappear if I upgraded to 14! :)

            • 3. Re: Save as PDF script does not work when 'Specify options' is selected
              philmodjunk

              It shouldn't happen in 13. Many use 13 to do this with no trouble so it is not clear at this time why it is not working for you.