Compare two variables

Solved


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 code1_check=@code1:Great}
{if code1_check<>@code1:Great_no}   

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

{if code1_check=@code1:Great}
{else:Great_no}   

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

Support

Forums