ISNOTHING
Returns TRUE
if the value is the special value NOTHING
, FALSE
otherwise
Usage
ISNOTHING(value)
Parameters
value |
(Required) The value to check |
Examples
More information
NOTHING
is a special value often returned by a function when it is unable to return a value.
This lets you check if a value is NOTHING
. The main use cases for this is that a variable’s value
will be NOTHING
if no value was entered/selected for the following questions and they were marked as optional:
@DATE_QUESTION
@NUMBER_QUESTION
@PICK_ONE_QUESTION
@YES_NO_QUESTION
If you want to display something special when nothing was entered for them, you can use <# @IF(ISNOTHING(my_var)) #> ... <# @ENDIF #>
.
If, on the other hand, you want to display something only if a value was entered, you can use either:
<# @IF(NOT(ISNOTHING(my_var))) #> ... <# @ENDIF #>
<# @IF(ISTEXT(my_var))) #> ... <# @ENDIF #>
for a@PICK_ONE_QUESTION
with text values<# @IF(ISNUMBER(my_var))) #> ... <# @ENDIF #>
for a@NUMBER_QUESTION
<# @IF(ISDATE(my_var))) #> ... <# @ENDIF #>
for a@DATE_QUESTION
More information about NOTHING
can be found in its documentation, see below.