how do I reference different fields from different records in a message?
There are scripted and calculation methods that may work for you, but the details depend on the design details of your database. Can you give an example of how your records from which you want to compose your email are set up?
The records conain information about studies run on patients and I want to send an email to incoming patients regarding their booking time. So i am performing a find with name of the participant and the date they are coming. Sometimes on a single day, a patient is to participate in two different labs one after the other and I need to send the information about both studies (for that day) to them.
That being said, my found set contains two records. Let 's say the fields are Name, dateOfVisit and StudyName. If in the body of the message, I include something like CurretTable::StudyName, it will return only the StudyName of the record I am currently at. How can I reference the other record's StudyName field?
First create a layout based on this same table that only has those three fields on it.
Now define a global text field gStudies and place it on some other layout.
Now this script can capture the text from these fields and paste the data from all the records into gStudies.
#First, perform a find or use Go To Related records to find just the records you want in your email.
Go To Layout [//specify layout with just the three fields on it]
Copy All Records
go To Layout [specify the layout where you have the global text field, gStudies]
Paste [/specify the gStudies field]
Now you can set up a send mail script step where you can include gStudies in the body of your email.
got it, thanks!