1 Reply Latest reply on Oct 14, 2013 10:38 AM by philmodjunk

    Send an email to all related email addresses



      Send an email to all related email addresses


           Hello all!

           I'm trying to design a script to send a Location Report to all email addresses associated with a particular Location.

           There are three pertinent tables: Locations are related to Contacts, and Contacts are related to EmailAddresses. The challenge is that I have a join table linking my Locations to Contacts and Contacts to EmailAddress.

           When I run the script to send the Location Report, the intended result is an email addressed to ALL email addresses of ALL contacts related to that Location.

           What is actually happening when I run this script is I only get the first email address of the first client.  I've tried checking "Collect address across found set", but that doesn't seem to have any affect.

           Does anyone out there have any thoughts on this?

           Thanks in advance!

           Evan Stein

        • 1. Re: Send an email to all related email addresses

               If I am reading your post correctly, your script is on a Location layout at the time you want to send this email. Thus your set of email addresses are not part of the current found set--they are in a related table. The following calculation can be adapted to your table/field names to send out the email to all related email addresses:

               Substitute ( List ( EmailAddress::EmailField ) ; ¶ ; "; " )

               You can specify this calculation in the TO box in the Send Mail dialog and it assumes that a semi colon ; is the correct delimitter to use for your email client. In a few cases, you may need to use a comma instead.