Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

This topic is 3854 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

Ok, I posted on this subject a long time ago but for some reason I can't find my original posting in my content. So please don't be too harsh on me for re-posting this.

 

I have an E-mail script that I have been working on that I was never able to get fully resolved. Many records contain duplicate E-mail addresses. The reason for that is we have several recurring customers that come to us to do a lot of different little jobs. Since we bill monthly, we can have as many as 20 different records for one customer. The only thing I can't get the script to do is send one combined .pdf file (one attachment, as I know that FileMaker cannot send mutliple http://help.filemaker.com/app/answers/detail/a_id/323/kw/multiple%20file%20attachments) of the statements to the customer rather than 20 separate emails with each statement attached. I feel like this is something that should be possible.

 

Attached is a .pdf of my crazy looking script, which is based on the demo posted here: http://fmforums.com/forum/topic/65699-emailing-a-pdf-form-from-fm-9/.  Any help would be very much appreciated!

Email script.pdf

Posted
Many records contain duplicate E-mail addresses. The reason for that is we have several recurring customers that come to us to do a lot of different little jobs. Since we bill monthly, we can have as many as 20 different records for one customer.

 

Do you not have a separate table of Customers, where each customer has a unique record?

 

 

as I know that FileMaker cannot send mutliple http://help.filemake...ile attachments)

 

True, but Filemaker CAN append to an existing PDF, so this could be one (slow) way to handle this (first record in the group: create the PDF; all other records: append to PDF; last record in the group: send the mail).

Posted

Yes, I do actually have a customer table that assigns a unique ID to customers. Problem is that the co-worker who deals with this is not good about keeping that table updated, so some customers are in the table and some are not. I would be happy to enforce it if it would make the script work...hmm, maybe I can make a script for that so that all she has to do is press a button! Anyway, here I go picking your brain again, Comment. Please tell me more...

Posted

It can actually work without the customers table too, but it's more convenient this way. Plus you can customize the e-mail (and/or the statement) with details from the customer's record.

 

 

Now the problem is that I don't understand your existing script, so I will describe a general procedure:

 

1. Find the customer records that have jobs that need to be included in the statements. This means performing a find in the Customers table, using fields from the related Jobs table;

 

2. Loop among the found records in the Customers table, doing:

 a. GTRR in Jobs;

 b. constrain the found set to include only jobs that need to be included in the statement;

 c. produce the PDF, using all records in the found set.

 d. send the mail to the (one) customer);

 e. return to the Customers layout;

 f. go to the next record (exit after last).

Posted

Ok Comment, it took this novice all day to make it happen, but it finally did, all thanks to you. This script has been a conundrum for YEARS in my office and our resident FileMaker guru couldn't even figure this out. I'm so grateful and I wish I could send you some sort of thank you gift! Thank you, thank you so very much. :worship: :worship: :worship:

Posted

Yes, it really does...I confess to a full lap victory dance around my livingroom when I got it to work. :yay: It's such a great way to learn the program when working through it like that.

  • Like 1

This topic is 3854 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.