I would suggest exporting the schedule as a separate file, like a PDF generated from a list view. Then you can send it as an attachment to the email, rather than trying to merge it in a potentially messy format. This way you can control the schedule format completely.
A simple script would look something like this:
Go To Layout [ printable schedule ]
perform find //for student's schedule
set variable [ $path ; "file:" & get(temporarypath) & "schedule.pdf" ]
save records as PDF [ $path, found records ]
go to layout [ original layout ]
send email //specify $path under the attachment field.
I currently use that approach, but was hoping to put the schedule in the email body rather than doing an attachment. Is there any other approach to accomplishing this?
Sure, but I wouldn't recommend it. Email support for HTML email is spotty and delimited data can look pretty terrible.
You can gather the data into a variable via script, then merge that variable into your email body.
Go To Layout
perform find //for schedule
Go To Record
Set Variable [ $schedule ; List ( $schedule ; ( schedule::date & " " & schedule::time & " " & schedule::comments ) ) ]
go to record
exit loop if
Go To Layout
Send Mail //merge $schedule into your email body.
Thanks so much! Your solution is perfect! I really appreciate it!
Thanks. Glad I could help.
Great idea, thanks!