NOT TRUE_FALSE Operator

The NOT TRUE_FALSE operator returns a value of true if the expression or True/False variable you specify is false.

This operator accepts any expression that evaluates to either true or false and returns the opposite. This can be useful in determining template logic.

Operator Model After you drag and drop the model into the script tab: Expression returns:
NOT  NOT ⟦TRUE_FALSE⟧ Replace ⟦TRUE_FALSE⟧ with an expression that evaluates to a true/false value.   A true/false value.

Example


You can use the NOT operator in an IF statement to check if something is NOT the case:

IF tf1
SET textK TO "tf1 is TRUE"
END IF

IF NOT(tf1)
SET textK TO "tf1 is FALSE"
END IF

The following script example further illustrates how the operator works using a true/false variable called tf1 and a text variable called textTE:

ASK tf1
FORMAT ( tf1, "TRUE/FALSE" )
RESULT + " , " + FORMAT ( tf1, "yes/no" )
RESULT + " , " + FORMAT ( NOT( tf1 ), "YES/NO")
SET textTE TO RESULT

If you answer tf1 "Yes", the value of textTE is "TRUE , yes , NO".
If you answer tf1 "No", the value of textTE is "FALSE , no , YES".

Download

After you download the example template, you can import the template to any workspace to see this example code in action.