i would like to be able to email attachments that are included on a record when its updated. the schedule i have setup works fine and emails the attachments. but i want NO email to be sent if no attachment exists in the 'IP_File_Upload' field.
currently i have
if(input.IP_File_Upload != NULL)
{
if((input.Currently_With == input.IP_Approver))
{
if((input.IP_Status != "IP Approved"))
{
if((input.IP_Status != "IP Topic and IP File Fully Approved"))
{
sendmail
[
from:zoho.loginuserid
to:input.IP_Approver
subject:"Firm Building Tracker - Updated IP Pack - " + input.Topic_Name
message:"<P>Hi " + input.IP_Approver + "<BR><BR>" + input.Modified_User + " has uploaded an updated version of the IP pack that is currently in development for the topic: " + input.Topic_Name + ", these files have been attached to this email.<BR><BR>Comments are:<BR>" + input.Past_Comments + "<BR><BR>Kind regards, <BR>The FB Tracker<BR><BR>(Ref:IPAP_IPATT)</P>"
content type:HTML
attachments :file:input.IP_File_Upload,file:input.File_attachment_2,file:input.File_attachment_3,file:input.File_attachment_4
]
}
}
}
}