The body of the message is a field (a text field or calculated field). Create a calculation field:
msg_body = "Dear " & Client::First Name & ..
then select that field for the send mail dialog.
In addition, you can set a variable with the same calculated text and set the body of the message to that variable.
Set Variable ( $msg_body ; "Dear " & Client::First Name & ... )
the variable (set by script) does not store the values beyond the script, so no field to create.
Once you get that method working, you might want to make this something more flexible should you discover the need to modify the basic message in the future.
Set up a text field in a dedicated table of such messages where you enter your email message text like this:
Dear <<Client First Name>>,
Thank you for... (and so forth all in one field).
Then, to put this into the body of an email, you do this:
Substitute ( MessageTable::Textfield ; ["<<Client First Name>>" ; Client::FirstName] ; [<<next field placholderhere ; Table::field ] )
You can use one square bracketed substitution pair for each place where you need to replace a <<placeholder>> with data from your database.
The advantage to this approach is that the message can undergo simple edits without the need for you the developer to come in and redefine a calculation as the update is now a data entry change.
The variable option worked like a dream. Thank you
awesome! a bonus of putting the variable into the body?
you can have several canned messages (calculated or not) and branch in a script to set the one needed into the variable. The Send Mail step need never change, as the variable is set by branching.