String functions
Uppercase
To display data field value in uppercase, use following expression.
{% uppercase({dataFieldName}) %}
Lowercase
To display data field value in lowercase, use following expression.
{% lowercase({dataFieldName}) %}
Capitalize
Uppercase the first character of each word in a string.
{% capitalize({dataFieldName}) %}
Split
The split(delimiter, string) function allows to split string into an array.
{% split("_", "Some_string") %} => ["Some", "string"]
Replace
The str_replace([string: search], [string: replace], [string: the original string])
function replaces all occurrences of a substring within a string.
{% str_replace("dog", "cat", "this is dog") %}
This expression output is: this is cat
Substring
The substr ( string $string , int $offset , int|null $length = null )
returns the portion of string specified by the offset and length parameters.
{% substr("This is test", 0, 2) %} // Result: Th
{% substr("This is test", 1, 2) %} // Result: hi
{% substr("This is test", -2) %} // Result: st
Count
The count({stringData}) returns the length of the string
{% count("abcd") %} // Result: 4
Related articles you may find helpful
- How to copy a template from one workspace to another?
- Is it possible to conditionally change the component style or hide the component?
- Text Component
Updated on: 16/02/2025
Thank you!