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.
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.
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.
Thank you for your help with this. It seems like my best option until filemaker supports email merging layouts.