Articles in this section

How to convert text to proper case using Proper()

This article explains what the Proper() function 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 on the PC.
  • Space owner access to the Templafy tenant.

What is the Proper() function?

Proper() is a function that converts a piece of text to proper case, meaning that the first letter of every word is capitalized.

Proper() logic

Syntax {{Proper(text)}}
Input Text
Output Proper case version of the text

Proper() function examples

Example 1

Using the Proper() function to convert text to proper case.

Binding {{Proper("this is text")}}
Output "This Is Text"

Example 2

Using the Proper() function together with IfElse() to convert the 'Title' text if the 'ConvertToProperCheckbox' checkbox question originating from the response form is checked.

Binding {{IfElse(Form.ConvertToProperCheckbox, Proper(Form.Title), Form.Title)}}
Input Form.Title= "this is a title" Form.Title= "this is a title"
Condition

Form.ConvertToProperCheckbox = "☑"

(True)

Form.ConvertToProperCheckbox = ""

(False)

Output "This Is A Title" "this is a title"

Example 3

Using the Proper() function together with IfElse() to convert the 'Title' text if the 'HeadlineType' dropdown question originating from the response form is using the option 'Title'.

Binding {{IfElse(Equals(Form.HeadlineType.Name, "Title"), Proper(Form.Title), Form.Title)}}
Input Form.Title= "this is a title" Form.Title= "this is a title"
Condition

Form.HeadlineType.Name = "Title"

(True)

Form.HeadlineType.Name = "Not a title"

(False)

Output "This Is A Title" "this is a title"

 

sentencecase sentence case separate text tech_role
Was this article helpful?
0 out of 0 found this helpful

Comments

0 comments

Article is closed for comments.