You need to sign in to do that
Don't have an account?
SeanGorman
Putting a comma into a VF Email IF statement breaks
I have a very customised email in Visualforce.
I want to write quite complex sentences in it using IF statements but I have found that I get errors in the email template if I have a comma in the comment:
{!if(var=true, "AA", "A,A")} breaks when I try to save the template.
{!if(var=true, "AA", "A A")} works fine.
Hi,
{!if(var=true, "AA", "A A")} works fine, because If condition should be as in the forllowing format,
IF(<expression>,value_if_true,value_if_false)
Hope this helps you...!
Please give kudos and mark this as a solution, If you found this answer as useful to others as well.
The issue is that you cannot, it seems, add a comma to the values (whether true or false). The quote marks do not delimit the syntax checker.If I put "" in the value I want the syntax checker to ignore what is inside them.
If(var=true, "Ignore what is here, it is just text.", "Ignore this too; just text")