I have a script token that checks to see if one of our integer fields is over 9; if it is over 9, I want the html in the token to display, if it's less than 9 I want no html to display in that area. I wrote the velocity script correctly syntax-wise, but the "#if FIELD > 9" comparison is not working.
I created an integer variable and added a parseInt function and it works, but then the email that it's used in won't Approve - it throws up this error message:
Does anyone have any idea how I can get the token to satisfy Marketo? Is there another function that can be used rather than parseInt to make the comparison valid?
Here is the token code:
#set($Integer = 0)
#if (($Integer.parseInt(${lead.Domain_Use_in_Past_Year__c})) > 9)
<table align="center" border="0" cellspacing="0" cellpadding="0">
<tr>
<td height="40">
</td>
</tr>
<tr>
<td align="center" style="font-size:18px; color: #A5A9AC; font-weight:100;">
${lead.Domain_Use_in_Past_Year__c}
</td>
</tr>
</table>
#end
Any help is appreciated!