IsNumber()
Checks whether the specified value is a number. This function takes an argument of any type and returns a Boolean value. If the value is a number, the function returns the Boolean value TRUE
. If the value is not a number, the function returns the Boolean value FALSE
.
Syntax
IsNumber(<value>)
Input
value
Boolean, date, integer, number, string
The value to check.
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
IsNumber($number_of_cars)
returnsTRUE
. - The expression
IsNumber(2)
returnsTRUE
. - The expression
IsNumber(2.0)
returnsTRUE
. - The expression
IsNumber($first_name)
returnsFALSE
. - The expression
IsNumber("Lee")
returnsFALSE
.