top of page

13. Clear a Variable

Description

How to clear a variable's answer.

Code

Explanation

Use SET Variable TO UNANSWERED. This works for all types of variables. For example:

SET TextVar TO UNANSWERED
SET DateVar TO UNANSWERED
SET NumVar TO UNANSWERED
SET TFVar TO UNANSWERED
SET MultChoice TO UNANSWERED
For text variables, you can also use SET TextVar TO "".

Caveat: There is a temptation to want to use CLEAR to remove a variable's answer. Contrary to intuition, CLEAR does not clear a variable. Rather, it clears out all of a multiple choice variable's options. Careful!

bottom of page