Compare two variables


First, the right hand side of an {if block is treated as a string literal.

So {if code1_check == code1 checks if the attribute named code1_check (the space is treated as part of the attribute name) is equal to the string = code1.
The second checks if the attribute named {code1_check} is different from the string {code1}.

If you want to compare two attributes, you need to use the @ prefix. I think what you want in this case is:

{if [email protected]:Great}
{if code1_check<>@code1:Great_no}   

Or, as you're checking two sides of one condition, you could do:

{if [email protected]:Great}

This topic is now closed. Topics are closed after 60 days of inactivity.