Articles in this section

How to reverse the value of a True/False statement using Not()

This article explains what the Not() operator is and provide examples of how it can be used with the binding syntax in smart templates.

  Prerequisites

  • Library and at least one Dynamics module enabled.
  • Templafy Desktop and Office VSTO add-in installed.
  • Space owner access to the Templafy tenant.

What is the Not() operator?

Not() is an operator that reverses a True/False statement, where True becomes False and False comes True.

Not() logic

Syntax {{Not(True/False)}}
Output True/False

Not() operator examples

Example 1

Using the Not() operator 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() operator 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() operator 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."
repeater reference tech_role
Was this article helpful?
0 out of 0 found this helpful

Comments

0 comments

Article is closed for comments.