You need to sign in to do that
Don't have an account?

If condition in email template
I'm using the following statement in custom email template:
{!IF({!Battle_Station__c.Project_Status__c}="Green","Green","Not Green")}
It giving me an output like this:
="Green","Green","Not Green")}
Can somebody pointout what might be the reason?
Thanks in advance.
{!IF({!Battle_Station__c.Project_Status__c}="Green","Green","Not Green")}
It giving me an output like this:
="Green","Green","Not Green")}
Can somebody pointout what might be the reason?
Thanks in advance.
Try {!IF(Battle_Station__c.Project_Status__c="Green","Green","Not Green")}
I guess this should work
Thanks for the reply.
I tried that above snippet, but it gives me nothing.
What type of email template are you using for this purpose? Text or Visualforce or HTML
Did you try testing it as follows:
Click on the button Send Test and Verify Merge Feilds as shown in above image.
Select a test record from the lookup (in your case Battle station record). Click OK.
Then check is your results are as intended.
Hope this helps.
Regards,
CloudSavvyProg
Thanks for the reply.
I tried the same. still I got no output.
What type of email template are you using for this purpose? Text or Visualforce or HTML
Can you post the screen shots please?
Regards,
CloudSavvyProg
Try the following :
Could you post a snippet of your code.
this is my language field: {!Account.Language__c} which evaluates to English or French.
I tested your code as above as follows:
and tested this variation too:
I tested with an account with French language, and it evaluates to "notfrench" which makes me believe that it is not actually working.
my full original code is this, and when tested, both IF statements return blanks.
Please advise.
I took a look at my resolution of last year and applied it to your code.
The following should work:
Hope this does the trick.
It seems that the conditional statement is not working...
{!IF(Account.AnnualRevenue > 1000, "Revenue is more than 1000", "Account is fine" )}
The above statement gives nothing.
Any support will be appretiated.
thanks, Mano
but not sure why > and < are not working may be because it is a checkbox field.
but can you try below lines:
1. {!IF({Account.AnnualRevenue} > 1000, "Revenue is more than 1000", "Account is fine" )}
2. {!IF("{Account.AnnualRevenue}" > 1000, "Revenue is more than 1000", "Account is fine" )}
Try this, this will return expected results!