Report Studio offers a wide range of string functions to help you manipulate and format text-based data. These functions are especially useful when creating custom attributes or calculated metrics.
Below is a reference guide for each available string function, including examples to help you get started.
Quick Links:
String Construction & Formatting
Trimming & Cleanup
Length & Positioning
Case Conversion
Search & Pattern Matching
Conversions
Tips for Using String Functions
Quick Reference: Common String Functions
| Function | Description |
|---|---|
BeginsWith |
Returns True if text starts with a specified substring |
Char |
Returns a character from a numeric ASCII value |
Concat |
Combines multiple strings together |
ConcatBlank |
Combines strings and skips blanks/nulls |
EndsWith |
Returns True if text ends with a specified substring |
InitCap |
Capitalizes the first letter of each word |
LastPosition |
Finds the last occurrence of a substring |
LeftStr |
Returns a set number of characters from the left |
Length |
Counts the number of characters in a string |
Lower |
Converts all characters to lowercase |
LTrim |
Removes leading spaces |
Match |
Returns True if text matches a specified pattern |
Position |
Returns the position of the first occurrence of a substring |
RepeatStr |
Repeats a string a specified number of times |
Replace |
Replaces part of a string with another |
RightStr |
Returns a set number of characters from the right |
RTrim |
Removes trailing spaces |
Split |
Splits a string by a delimiter |
SubStr |
Returns a portion of a string (substring) |
TitleCap |
Capitalizes the first letter only |
ToNumber |
Converts text to a number |
ToString |
Converts a number or date to text |
Trim |
Removes leading and trailing spaces |
Upper |
Converts all characters to uppercase |
String Construction & Formatting
Concat(Text1, Text2, ...)
Combines multiple text values into one continuous string. All values are included—even if blank.
Example:Concat([First Name], " ", [Last Name])
Returns: "Alex Smith"
ConcatBlank(Text1, Text2, ...)
Same as Concat, but skips over empty or null values to avoid extra spaces or characters.
Example:ConcatBlank([First Name], " ", [Middle Name], " ", [Last Name])
Returns: "Alex Smith" if middle name is blank (no double space)
RepeatStr(Text, Number)
Repeats the given string a specified number of times.
Example:RepeatStr("-", 3)
Returns: "---"
Replace(Text, Old, New)
Replaces all instances of a substring within a string.
Example:Replace([Task Name], "_", " ")
Changes "Client_Onboarding" to "Client Onboarding"
Split(Text, Delimiter)
Splits a string into parts based on the delimiter. Typically used within a larger expression.
Note: Report Studio will extract the first element by default.
Example:Split([Email], "@")
Returns the part before the "@"
Trimming & Cleanup
Trim(Text)
Removes both leading and trailing spaces.
LTrim(Text)
Removes spaces at the beginning only.
RTrim(Text)
Removes spaces at the end only.
Example for all:Trim(" Project A ")
Returns: "Project A"
Length & Positioning
Length(Text)
Returns the total number of characters in the string.
Example:Length([Client Name])
LeftStr(Text, Number)
Returns the first n characters from the left.
Example:LeftStr([Project Code], 3)
Returns: "ABC" from "ABC-123"
RightStr(Text, Number)
Returns the last n characters from the right.
Example:RightStr([Project Code], 3)
Returns: "123" from "ABC-123"
SubStr(Text, Start, Length)
Extracts a substring from the string starting at a given position.
Example:SubStr([Code], 2, 3)
If value = "A12345", returns: "123"
Position(Subtext, Text)
Returns the index of the first match of Subtext in Text. Returns 0 if not found.
Example:Position("Urgent", [Project Name]) > 0
LastPosition(Subtext, Text)
Returns the index of the last occurrence of Subtext.
Example:LastPosition("-", [Project Code])
Useful if project codes contain multiple dashes.
Case Conversion
Lower(Text)
Converts the string to lowercase.
Upper(Text)
Converts the string to uppercase.
InitCap(Text)
Capitalizes the first letter of each word, rest lowercase.
Example:InitCap("quick BROWN fox")
Returns: "Quick Brown Fox"
TitleCap(Text)
Capitalizes only the first letter of the entire string, leaving the rest unchanged.
Example:TitleCap("monthly hours report")
Returns: "Monthly hours report"
Note: This differs from InitCap(), which capitalizes the first letter of each word.
Search & Pattern Matching
BeginsWith(Text, Subtext)
Returns True if Text starts with Subtext.
Example:BeginsWith([Project Name], "Client")
EndsWith(Text, Subtext)
Returns True if Text ends with Subtext.
Example:EndsWith([Task Name], "QA")
Match(Text, Pattern)
Returns True if Text matches a specific pattern. (Basic regex-style match)
Example:Match([Email], "@")
Returns True if the email contains @
Conversions
ToString(Value)
Converts a number or date to text.
Example:ToString([Total Hours])
ToNumber(Text)
Converts a text string into a numeric value, if possible.
Example:ToNumber("123.45")
Tips for Using String Functions
- You can combine multiple string functions in one formula
Example:Upper(Trim([Task Name])) - Always use square brackets
[]around attribute names - Text values like spaces or dashes must be enclosed in quotes
" "
Exploring Further:
ClickTime's Report Studio may offer additional string functions beyond those listed above. We recommend exploring the function list in the Formula Editor to view all available options. Each function includes a description to help guide your usage and ensure your formulas work as expected.
Whether you're building dynamic labels, cleaning up inconsistent data, or constructing readable codes, these string functions give you powerful tools to work with text in meaningful ways.
Comments
0 comments
Please sign in to leave a comment.