Page 1 of 1

IF statement within an external email file

Posted: Thu Sep 11, 2014 5:45 am
by gabrielp
Hi guys,

I have an email with an external HTML file I'm using in a Switch flow. I'd like to say, IF comments is not blank, then include this block.



Can this be done?



All I can think of is routing to another email configurator if the comments is equal to "" and then send all others to the other configurator. But that involves having two email files: one with comments and one without.

IF statement within an external email file

Posted: Thu Sep 11, 2014 9:21 am
by freddyp
The comments must come from some variable. Variables that are empty will generate an empty string and hence will not be there.



One method you can use to generate different types of content is to use two folders to which you add something in "Attach email body text". In the mail template you put [Job.EmailBody] and depending on the route taken by the job you get a different text.



Note that when you "Attach email body text" multiple times it is not destructive, you keep adding text.



Freddy