Equal()
Compares two specified values to determine if they are the same. This function takes two values of any type as arguments and returns a Boolean value. If the first value is the same as the second value, the function returns the Boolean value TRUE
. If the first value is different than the second value, the function returns the Boolean value FALSE
.
Syntax
Equal(<first_value>, <second_value>)
Input
first_value
Boolean, date, integer, number, string
The first value to compare.
second_value
Boolean, date, integer, number, string
The second value to compare.
Output
Boolean
Examples
Assume that you have a form in which there is a text question and a number question. The text question has the reference name first_name and was answered Lee. The number question has the reference name number_of_cars and was answered 2.
- The expression
Equal($first_name, "Lee")
returnsTRUE
. - The expression
Equal($number_of_cars, 2)
returnsTRUE
. - The expression
Equal($first_name, $number_of_cars)
returnsFALSE
.