Text Functions
Text Function in FlowOn Logic offer a set of built-in utilities to manipulate and transform text data. These functions enable you to perform operations such as concatenating strings, changing letter case (capitalization), counting characters, and extracting substrings.
Text Functions are valuable for managing and enhancing text-based information within your expressions, making it easier to work with and analyze textual data.
Concatenate
Join multiple text strings together.
Concatenate(<Operand1>, <Operand2>, [<Operand 3>])
| Parameter | Required | Type | Description |
|---|---|---|---|
| Operand1 | Yes | String | The first text string to be joined. |
| Operand2 | Yes | String | The second text string to be joined. |
| Operand3 | No | String | Additional text strings to be joined (optional). |
| Return value | String | The resulting text string after concatenation. |
- Example
Concatenate("FlowOn","Logic")
Result: "FlowOn Logic"
Replace
Replace one string with another in the original string.
Replace(<String>, <Old Text>, <New Text>)
| Parameter | Required | Type | Description |
|---|---|---|---|
| String | Yes | String | The original string in which the replacement will occur. |
| Old Text | Yes | String | The text to be replaced within the original string. |
| New Text | Yes | String | The new text to replace the old text within the original string. |
| Return value | String | The resulting string after the replacement. |
- Example
Replace("Hello, world!", "world", "universe")
Result: "Hello, universe"
Substring
Return a substring from a starting index to the end of the original string.
Substring(<String>, <Start Index>)
| Parameter | Required | Type | Description |
|---|---|---|---|
| String | Yes | String | The original string from which the substring will be extracted. |
| Start Index | Yes | Number | The starting index from which the substring will begin. |
| Return value | String | The resulting substring from the start index to the end of the original string. |
- Example
Substring("MENA Region", 5)
Result: "Region"
To Lower Case
Convert a text string to lowercase.
ToLowerCase(<String>)
| Parameter | Required | Type | Description |
|---|---|---|---|
| String | Yes | String | The text string to be converted to lowercase. |
| Return value | String | The resulting text string in lowercase. |
- Example
ToLowerCase("Hello FROM THE FlowOn team")
Result: "hello from the flowOn team"
To Upper Case
Convert a text string to uppercase.
ToUpperCase(<String>)
| Parameter | Required | Type | Description |
|---|---|---|---|
| String | Yes | String | The text string to be converted to uppercase. |
| Return value | String | The resulting text string in uppercase. |
- Example
ToUpperCase("john is a functional consultant")
Result: "JOHN IS A FUNCTIONAL CONSULTANT"
Trim
Remove whitespaces from the start and end of the string.
Trim(<String>)
| Parameter | Required | Type | Description |
|---|---|---|---|
| String | Yes | String | The text string from which leading and trailing whitespaces will be removed. |
| Return value | String | The resulting text string with leading and trailing whitespaces removed. |
- Example
Trim(" Beirut ")
Result: "Beirut"
Index Of Substring
Return the starting position of a substring.
IndexOfSubstring(<String>, <Substring>)
| Parameter | Required | Type | Description |
|---|---|---|---|
| String | Yes | String | The original text string in which the search will be performed. |
| Substring | Yes | String | The substring to search for within the original string. |
| Return value | Number | The starting position (index) of the substring within the original string. |
- Example
IndexOfSubstring("Beirut is the capital city of Lebanon","city")
Result: 20
Last Index Of Substring
Return the starting position for the last occurrence of a substring.
LastIndexOfSubstring(<String>, <Substring>)
| Parameter | Required | Type | Description |
|---|---|---|---|
| String | Yes | String | The original text string in which the search will be performed. |
| Substring | Yes | String | The substring to search for within the original string. |
| Return value | Number | The starting position (index) for the last occurrence of the substring within the original string |
- Example
LastIndexOfSubstring("Byblos, is a Lebanese city and Byblos is one of the oldest cities in the world","Byblos")
Result: 31
Get String Length
Return the length of a specific string
GetStringLength(<String>)
| Parameter | Required | Type | Description |
|---|---|---|---|
| String | Yes | String | The string for which the length will be determined. |
| Return value | Number | The length of the specified string. |
- Example
GetStringLength("Dynamics 365")
Result: 11
What's Next
In this section, we've explored various text functions in FlowOn logic and learned how to apply them effectively. In the next section, we'll delve into Math functions for further understanding and application.