5 Replies Latest reply on Jan 10, 2015 8:51 AM by schamblee

    How to email multiple report layouts as pdf in single email

    danlee

      Title

      How to email multiple report layouts as pdf in single email

      Post

      Is there any way that I can send out an email attach multiple layouts (which are reports) as one single pdf in an email in an iPad instead of having 4 different pdf attached to the email?

      Right now I have a script to send one layout (report) as a pdf.  I have 4, (Data Summary, Body Composition, Blood Pressure and Welcome) that I would like to be combined into one pdf file.  Here is what my script looks like for Data Summary.  Right now the script is set up as if I am in the Data Summary layout.  Of course the other 3 are in a different layout.  

       

      Screen_Shot_2015-01-09_at_9.32.31_PM.png

        • 1. Re: How to email multiple report layouts as pdf in single email
          Mark_M

          >

          I don't know about the iPad, but...

          When you are in the script editor and the Save As PDF script is the active step, the lower part of the box is active for setting options for that script step.  One of the options is "Append to existing PDF".  I did a quick check on my desktop and it does just what it says it does, it will append an additional page (or pages) to an existing file.

          So your script would have multiple sections, the first section creates the file with the first section (Layout), once that's done it moves to the next section of the script to create the next section of the report (layout).  Repeat, repeat.  The first section is set to create, with sections 2, 3, and 4 set to Append to the same file.

          >>>>

          • 2. Re: How to email multiple report layouts as pdf in single email
            danlee

            Thank you.  This is what I have and when I execute the script it only sends the send pdf in the email.  It doesn't append it to the first pdf file and is not sending both.

            • 3. Re: How to email multiple report layouts as pdf in single email
              Mark_M

              .

              From a troubleshooting perspective you have 3 factors to consider: (A) the Save as PDF process, (B) the iPad environment, (C) the Email process.

              If it were me I'd try to eliminate two factors and work with only one thing at a time.  The first two that I'd eliminate would be the iPad and Email factors.

              ******************

              Step 1: Work with a copy of the file on your full client (i.e. desktop/laptop) environment and concentrate only on the Save as PDF script step.  Verity that you can script the creation of the file and then append sections 2, 3, and 4.  Here you are proving to yourself that the Append process works in the full client.

              Step 2:  Now move to the iPad environment and repeat just the document creation process.  If it works on the full client and not no the iPad you know now that it's not the Save as PDF step that is the problem, it's the environment in which that step is being performed.  Now whether it CAN work on the iPad is a question beyond my skill level.

              Step 3:  Only after answering Steps 1 and 2 would you then work on the Send Email step.

               

              >>>>

              • 4. Re: How to email multiple report layouts as pdf in single email
                Mark_M

                >

                I notice you don't set the variable $PathPDF until after the documents are created.  I've always created the variable for Path and File name early in the script and then use them in the Save as PDF process and Email steps so ensure I'm using the same values.

                :Shrug: might be nothing.

                >>>>

                • 5. Re: How to email multiple report layouts as pdf in single email
                  schamblee

                  Appending is not supported in Filemaker Go.  See page 15 of the Filemaker Development Guide.

                  https://www.filemaker.com/support/product/docs/filemaker-go/fmgo_development.pdf