About this article
This article will explain what the Not() function is and provide examples of how it can be utilized with the binding syntax in smart templates.
Prerequisites
|
What is the Not() function?
Not() is a function that reverses a True/False statement, where True becomes False and False comes True.
Not() logic
Syntax | {{Not(True/False)}} |
Output | True/False |
Not() function examples
Example 1
Using the Not() function to reverse the value of the "TestCheckbox" checkbox question originating from the response form.
Binding | {{Not(Form.TestCheckbox)}} | |
Input | Form.TestCheckbox = "☑" | Form.TestCheckbox = "☐" |
Condition |
True |
False |
Output | False | True |
Example 2
Using the Not() function together with Equals() to compare two values and reverse the output.
Binding | {{Not(Equals("this is text", "this is text"))}} |
Condition | True |
Output | False |
Example 3
Using the Not() function together with Contains() and Lower() functions to check if the text contains the word "external" and apply the correct disclaimer.
Binding | {{IfElse(Not(Contains(Lower(Form.Body), Lower("external"))), "This document is only for internal use and should not be shared outside the organization.", "This document is external and can be shared.")}} | |
Input | Form.Body = "The body of this document is confidential and only used by partners and employees" | Form.Body = "The body of this document is external" |
Condition |
True |
False |
Output | "This document is only for internal use and should not be shared outside the organization." | "This document is external and can be shared." |
Related articles
Comments
0 comments
Article is closed for comments.