Use: | Compares multiple fields or variables to a specified value to determine if all of their values are equal. This function uses AND logic where each value being compared must equal the source value in order to return an equal value for the group. You can compare values with or without regard to case (case sensitive or case insensitive). For example, in a case-insensitive comparison, abc is the same as ABC or aBc.
Note: The COMPNOCASE function performs a case-insensitive comparison of two strings.
The NOTEQUAL function compares multiple fields or variables to a specified field or variable to determine if they are not equal. |
Syntax: | {EQUAL( «no case» , «compare_to» , «value1» , «value2»,,,, )}
|
Arguments: |
«no case»
1 = case insensitive
0 = case sensitive
«compare_to»
Field to compare other values to
«value1»
Field to be compared
«value2»,,,, (to «valuen»)
Each additional field to be compared
|
Returns: | 1 = Equal 0 = Not equal |
Example 1: |
Case insensitive
Fields:
txt_field = Test
txt_other_field1 = test
txt_other_field2 = Test
{EQUAL( 1 , {template_name_.txt_field} , {template_name_.txt_other_field1} , {template_name_.txt_other_field2} )} Result: 1 |
Example 2: |
Case insensitive
Fields:
txt_field = Test
txt_other_field1 = text
txt_other_field2 = Test
{EQUAL( 1 , {template_name_.txt_field} , {template_name_.txt_other_field1} , {template_name_.txt_other_field2} )} Result: 0 |
Example 3 |
Case sensitive
Fields:
txt_field = Test
txt_other_field1 = Test
txt_other_field2 = Test
{EQUAL( 0 , {template_name_.txt_field} , {template_name_.txt_other_field1} , {template_name_.txt_other_field2} )} Result: 1 |
Example 4 |
Case sensitive
Fields:
txt_field = Test
txt_other_field1 = Test
txt_other_field2 = test
{EQUAL( 0 , {template_name_.txt_field} , {template_name_.txt_other_field1} , {template_name_.txt_other_field2} )} Result: 0 |