I asked support about this, but figured it might be of interest to the community. Original Summary:
Can conditional operators be used in emails created by Automation Rules to hide fields that are empty?
We would like to send email notifications where fields are displayed only if they are not empty.
I tried this:
{{#=}}IF({{issue.Desired Delivery Date/Time}}!="","<b>Desired Pickup Date/Time:</b> {{issue.Desired Delivery Date/Time}}",""){{/}}And got this error:
Error rendering smart-values when executing this rule:
Unknown operator ':' at position 17: IF(2020-07-10T20:00:00.0+0000!="",<b>Desired Pickup Date/Time:</b> 2020-07-10T20:00:00.0+0000,)
I tried surrounding the value with quotes
{{#=}}IF({{"issue.Desired Delivery Date/Time}}"!="","<b>Desired Pickup Date/Time:</b> {{issue.Desired Delivery Date/Time}}",""){{/}}And got this:
Error rendering smart-values when executing this rule:
Missing parameter(s) for operator !=: IF("2020-07-10T20:00:00.0+0000"!="","<b>Desired Pickup Date/Time:</b> 2020-07-10T20:00:00.0+0000","")
Are the Math operators even able to compare string values?
Thanks!