3 Replies Latest reply on Dec 9, 2010 12:13 PM by fleng

    Creating PDF's in background

    fleng

      Title

      Creating PDF's in background

      Post

      Hi,

      I have created a solution where I'm managing a lot of grant applications that people send in to our organization.

      I'm keeping track of all the grant applications in my FM11 solution.

      Whenever we have decided to grant money or not to each of the applicants, I'm running a script that loops through all the records to generate a PDF with the answer to each applicant.

      In the loop, the script asks if the current applicant have an email address (notIsEmpty (Email)). If there is an email address, the PDF will be attached to an email to that person (in Mail). If not the PDF will automatically open (in Acrobat).

      All of this works very fine.

      MY PROBLEM

      My problem is, that when I run the script, it starts shifting back and forth between the Acrobat and Mail applications (I'm using Mac) and the script ends in whatever application the last record was generated in (either Mail or Acrobat).

      I would like the script to end back in Filemaker. I've ended the script with a Go To Layout (current) script step + a Show Custom Dialogue box to say that the operation is done. But still, when the script is through, It's one of the other applications that is active (and in "front")

      Any suggestions?

      Do you need any additional information?

      Thanks

      Soren 

        • 1. Re: Creating PDF's in background
          bcooney

          Hi Soren,

          I wouldn't open the PDF in Acrobat if there is no email address. Why are you doing this?
          Also, are you pausing at the email or sending without a dialog?

          Barbara

          • 2. Re: Creating PDF's in background
            fleng

            Hi Barbara,

            The reason is that we have to generate all the letters at once (usually around 50 letters). All the letters are being generated as PDF files (stores as reference). Letters to recipients with email addresses are automatically being attached to an email - there's a pause in this step, yes - just for double checking. Potentially I will skip the pause step when I'm done with the development - and I can see that that would help. Letter to recipients without email addresses have to be sent manually by regular mail - hence I open the PDF-files in Acrobat, ready for printing.

            Soren

            • 3. Re: Creating PDF's in background
              fleng

              And just for your information I have completely changed the workflow now.

              I guess you where right. That's where the problem was.

              Thanks for you time and comment