NextGen Knowledge Center

OREQUAL Function

Use:Compares multiple fields or variables to a specified value to determine if any of their values are equal. This function uses OR logic where any value being compared may 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.

Syntax:
{OREQUAL( «no case» , «compare_to» , «value1» , «value2»,,,, )}
Arguments:

«no case»
    1 = case insensitive
    0 = case sensitive
«compare_to»
    Value to compare against other values
«value1»  
    Value to be compared 
    You can type "PICK: to display the Picklist window for selecting a picklist to determine if any of its values is equal to the source value. 
«value2»,,,, (to «valuen»)
    Each additional value to be compared 
Returns:1 = Equal

0 = Not equal

Example 1:

Case insensitive
Fields: 
txt_field = Test
txt_other_field1 = test
txt_other_field2 = text
{OREQUAL( 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 = tests
txt_other_field2 = text
{OREQUAL( 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 = text
{OREQUAL( 0 , {template_name_.txt_field} , {template_name_.txt_other_field1} , {template_name_.txt_other_field2} )}

Result: 1

Example 4

Case sensitive
Field: condition_field = Cardiomyopathy
Picklist: Holter_Indications = Palpitations, Syncope, Near Syncope, A-Fib, A-Flutter, Arrhythmia, Tachycardia, Bradycardia, Cardiomyopathy
{OREQUAL( 0 , {condition_field} , "Pick: Holter Indications" )}

Result: 1