You need to sign in to do that
Don't have an account?
Bob DeRosier
datetime field in IF statement in HTML email template
I have an HTML email template that keys off a registration record that I am attempting have display a datetime field under certain conditions. If I display the field by itself
it displays as I expect. Similarly, this date/time field
does not display anything event though the field is populated. They are both date/time fields, so the non-uniform behavior puzzles me.
However If I put it inside an IF statement, it displays nothing. Both of the following produce blank output.
From my experimentation, this seems to be a problem displaying a date/time field within an IF statement.
{!Event__c.Follow_up_Date__c}
it displays as I expect. Similarly, this date/time field
{!DATEVALUE(Registration__c.Start__c)}displays as I expect. However,
{!DATEVALUE(Event__c.Follow_up_Date__c)}
does not display anything event though the field is populated. They are both date/time fields, so the non-uniform behavior puzzles me.
However If I put it inside an IF statement, it displays nothing. Both of the following produce blank output.
{!IF((1 = 1),DATEVALUE(Event__c.Follow_up_Date__c),'False')} {!IF((1 = 1),Event__c.Follow_up_Date__c,'False')}Note that in these 2 lines, one has DATEVALUE and the other does not.
From my experimentation, this seems to be a problem displaying a date/time field within an IF statement.