4 Replies Latest reply on Jun 10, 2013 1:04 PM by trent.fowler@hci.utah.edu

    Email Merge Multiple Records



      Email Merge Multiple Records


           Hi all,

           I have a database of patients, many of which have the same physician. I would like to email all of the physicians (one email per physician) a list of their patients. 

           Can I do this without creating a seperate physician table? I know that I could view all of the related patients in a portal if I did this, but a portal cannot be incorporated into an email script. 

           Any suggestions would be great!

        • 1. Re: Email Merge Multiple Records

                    but a portal cannot be incorporated into an email script.

               Nor can any layout be part of an email unless that layout is used to generate an attached PDF. And such a PDF could be generated from a layout with a portal.

               But the data from a portal can also be included in the body of an email via a calculation--elminating the need for an attached PDF if the format needs of your email are simple enough.

               A more detailed descriiption of the email you are trying to create and send would be helpful.

          • 2. Re: Email Merge Multiple Records

                 Thanks for the quick response. 

                 I was going to use the email script step then place all of my letter content into the message filed as a calculation. This way I could bypass the PDF generating.

                 I am unsure of how to create a calculation that would only include all of the patients that have the same physician. 

                 Concerning the letter, I have a database of patients from around the country and would like to email their physicians to find out if it is alright if we contact their patients to participate in a research study. For example, Hello Dr. _______, I would like to know if it is alright with you to contact (list of patients) to participate in a study we are conducting. Hopefully that clears things up.


            • 3. Re: Email Merge Multiple Records

                   If you have a relationship in place such that a portal on the layout that is current at the time Send Mail generates the email would list the patient names you want to include in your email, then you can use:

                   List ( RelatedTable::NameField )

                   As part of your calculation for the message body and you'll get a vertical list of names included in your email. If you have separate fields for last, first, middle names, you can define a calculation field in the related table that combines them in order for the list function I mention here to list them.

              • 4. Re: Email Merge Multiple Records

                     Thank you for your help with this. It seems like my best option until filemaker supports email merging layouts.