How does one condition whether an attachment will be attached to an email or not.
I have a project whereby an SQL is run followed by a Write Excel task to convert the data to EXCEL - and then to finally send this via email as an attachment.
I would like to conditionally attach it to the email only if there is data - otherwise not.
Currently, when I run my project, the sql convert to an EXCEL produces this error if there is no data:
[8099 - Convert Ctl Grp Negative] An unexpected error occurred. Your InputStream was neither an OLE2 stream, nor an OOXML stream I can set on a variable if this error occurs and continue the next process.
Depending on the variable value, I would like to attach an attachment to the email.
Currently, the attributes for an attachment do not have the ability to condition it.
Thanks in advance