3 Replies Latest reply on Apr 18, 2013 7:54 AM by AppGuy

    Filemaker Go/pdf and google mail

    mgearhart

      Title

      Filemaker Go/pdf and google mail

      Post

           I have a database that I have written to use on filemaker go for daily construction site reports.

           I would like to prepare and submit by pdf a daily report from the ipad to the office via email.

           Not quite sure how to accomplish the script to do the following:

           Print record as pdf.

           Email via google (gmail) to the office.

           Any assistance would be greatly appreciated.

           Thanks,

           Mark

            

        • 1. Re: Filemaker Go/pdf and google mail
          TSGal

               Mark Gearhart:

               Thank you for your post.

               The Send Mail script step will use Mail to send an email.  If Mail is configured for your gmail account, then the email will be sent out via your gmail account.  What steps are you using?

               Here is a sample script that should give you a good starting point:

               Set Variable [ $FileName ; Value: "Invoice.pdf" ]
               Save Records as PDF [ No dialog ; "$FileName" ; Records being browsed ]
               Set Variable [ $PDFPath ; Value: Get ( DocumentsPath ) & $FileName ]
               Send Mail [ Send via E-mail Client ; To: "user@abc.com" ; Subject: "Invoice" ; Message: "Here is your invoice" ; "$PDFPath" ]

               The first line is to create a filename.  In this case, it is Invoice.pdf.  I then save the records to the file.  Next, I set up where the file is located, and then in the Send Mail script step, I attach the PDF file.

               Let me know if you need additional clarification.

               TSGal
               FileMaker, Inc.

          • 2. Re: Filemaker Go/pdf and google mail
            mgearhart

                 Thanks to TSGal for the script suggestion.  I do fine with this until I hit the step to save record as PDF.

                 Not sure how to direct the output file to what directory on the ipad?  Also I have a choice when I do save that file to a directory to   "Create email with the file as attachment"  Should I use that option?

                  

                  Thanks for any additional assistance.

                 Mark Gearhart

            • 3. Re: Filemaker Go/pdf and google mail
              AppGuy

                   You have to lines in your script that are Save Records as PDF.  You only need one.  

                   Look at the sample code that was given above again.  All you should have to do is copy and paste and change the part where is says records being browesed.

                    

                   This will be the name of the pdf file generated. I don't see this in your script   - Set Variable [ $FileName ; Value: "Invoice.pdf" ]  - 

                   These two will generate the pdf -  Save Records as PDF [ No dialog ; "$FileName" ; Records being browsed ]

                                                     Set Variable [ $PDFPath ; Value: Get ( DocumentsPath ) & $FileName ]

                    

              The last one emails the client the file you just generated -   Send Mail [ Send via E-mail Client ; To: "user@abc.com" ; Subject: "Invoice" ; Message: "Here is your invoice" ; "$PDFPath" ]

                    

              JP