HampMac Posted September 22, 2004 Posted September 22, 2004 Hello, I have scanned the "eMail and FileMaker" section for an answer to my question, but I did not find one. Please pardon me if I overlooked a previously posted answer to my question. I am working on a file in FileMaker Developer 7 that has two tables. The first is a Content table with fields that make up the body of an email, and format of the email is fine. The second table is an Address Book table that contains three fields: Name, EmailRecipients (email address), and Group. I've set up two relationships between the Content Table and Address Book Table. One relationship keys off of the Name field and the other relationship keys off of the Group field. The idea is to give the user a choice of sending an email to a single person (in which case a group is not chosen), or to send to a group (where a group is chosen). Sending an email to a single person performs a script that works exactly the way that I expect it to work, however sending to a Group performs a different script that is supposed to place the Email Addresses of a found set from the Group relationship into the BCC field. Basically, my script is as follows: Go To Related Record [show only related records; From Table: Group; Using layout: "AddressBook" (AddressBook)] Go To Layout [View (Content)] Send Mail [To: Name::emailRecipients; BCC: Group::emailRecipents; Subject: :; Message: :] Name and Group are two different relationships representing the same AddressBook table. All of the email fields fill in properly except for the BCC field. When I choose a group and perform the script I get something that looks like this inside of the BCC field of my email: ",,,<[email protected]>,,,,,,,,". All of the commas seem to correspond to the number of records that I have in my Content table, and I don't understand why FileMaker isn't pulling the EmailRecipient data (email addresses) from the Group relationship. If I go to the AddressBook layout once the script has completed, I can see that the script has found the correct Group, and only records from the chosen group are in the found set, so I don't understand why it is not placing this data into the BCC field inside of the email. I hope this message is understandable, and I truly hope that someone can help me to understand what I am doing wrong. Thanks a bunch,
Addam Posted September 23, 2004 Posted September 23, 2004 I'm not sure if this will help, but one thing you might want to try is adding 4 fields... One - TO (calculation) Two - CC (calculation) Three - BCC (calculation) Four - SELECTION (selectable) The "Selection" field will have values that are preset to "TO, CC, BCC, none". In your script, you can run something that say's (in so many words), "Find this group of records and then replace the "Selection" with "CC" for all, then insert those results into your email field, then return them back to "none". Now the calculation field for CC's you would calculate everything that has "CC" selected and render the email addresses in one long string that you format. That way it will always be correct, no matter what is selected. This concept would be true for all "TO, CC, and BCC" fields (writen slightly different for each one). It will repeat the same for all or if you choose to select them manually, that will still work just take out the "replace" section. Again, I'm not sure if this is what you were looking for but hopefully it will point you in the right direction.
Recommended Posts
This topic is 7358 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 accountSign in
Already have an account? Sign in here.
Sign In Now