I have created a form called Physician Demographics with an Auto Number field. Within the form, I created a sub-form called AZ Medical License which includes a date field called Expiration Date. I would like to set up a scheduled event based on this expiration date. I have created a schedule that runs on the date and would like to email a reminder to the Email1 on the record with an expired date. I have created a fetch data in order to have access to the fields in the Physician Demographic Form. I have done this, however, when I try to create multiple records to test the reminder email, I only get the fetched data from Auto Number 1. Here is the code.
physicianInfo = Physician[Auto_Number != 0];
sendmail
[
from:zoho.adminuserid
cc:physicianInfo.Email1
subject:"AZ License wil Expire in 45 Days"
message:(((("This email is to remind that the Arizona License for ") + physicianInfo.First_Name) + " ") + physicianInfo.Last_Name) + " is set to expire in 45 days.<br>\n<div><br>\n<br>\nThank you.<br>\n<br>\n </div>"
content type:HTML
]