About this article
This article explains what the Lower() function is and provide examples of how it can be used with the binding syntax in smart templates.
Prerequisites
|
What is the Lower() function?
Lower() is a function that converts text into lowercase. This function can also be used to make comparisons between two pieces of text that might not have a case match.
Lower() logic
Syntax | {{Lower(text)}} |
Input | Text |
Output | Lowercase version of the text |
|
Lower() function examples
Example 1
Using the Lower() function to convert text to lowercase.
Binding | {{Lower("THIS IS TEXT")}} |
Output | "this is text" |
Example 2
Using the Lower() function together with IfElse() to convert the "Warning" text if the "ConvertToLowerCheckbox" checkbox question originating from the response form is checked.
Binding | {{IfElse(Form.ConvertToLowerCheckbox, Lower(Form.Warning), Form.Warning)}} | |
Input | Form.Warning= "THIS IS A WARNING" | Form.Warning= "THIS IS A WARNING" |
Condition |
Form.ConvertToLowerCheckbox = "☑" (True) |
Form.ConvertToLowerCheckbox = "☐" (False) |
Output | "this is a warning" | "THIS IS A WARNING" |
Example 3
Using the Lower() function together with IfElse() to convert the "Subject" text if the "DocumentType" dropdown question originating from the response form is utilizing the option "Not so important".
Binding | {{IfElse(Equals(Form.DocumentType.Name, "Not so important"), Lower(Form.Subject), Form.Subject)}} | |
Input | Form.Subject= "Hello World" | Form.Subject= "Hello World" |
Condition |
Form.DocumentType.Name = "Not so important" (True) |
Form.DocumentType.Name = "Important" (False) |
Output | "hello world" | "Hello World" |
Example 4
Using the Lower() function together with IfElse() and Equals() to compare the values of "Recipient A" and "Recipient B" questions originating from the response form and verify if they are similar but just using different casing. If they are similar display "Recipient A and B are the same and both packages should be consolidated and sent as one" otherwise show the value of the "RecipientB" question.
Binding | {{IfElse(Equals(Lower(Form.RecipientA), Lower(Form.RecipientB)), "Recipient A and B are the same and both packages should be consolidated and sent as one", Form.RecipientB)}} | |
Input |
Form.RecipientA = "John Smith" Form.RecipientB = "john smith" |
Form.RecipientA = "John Smith" Form.RecipientB = "john doe" |
Condition | True | False |
Output | "Recipient A and B are the same and both packages should be consolidated and sent as one" | john doe |
Related articles
Comments
0 comments
Article is closed for comments.