Text
Text functions perform operations such as concatenations or insertions on text. Text-based operations are 1-based, meaning that the index of the first character in a string is 1.
An item is selected and then added to the canvas or K2 field part by clicking the Add button or by dragging it to the right place.
Functions | Description | Example |
---|---|---|
Contains | Returns a true value if a substring is found within another string. | Sequence: "12345" Text: "234" Result: True |
Empty String | Returns an empty string. | Result: "Blank" |
Find | Returns the index if the specified string is found within another string. Returns 0 if no match can be found. | Substring: "12345" Text: "234" Result: 2 |
Hyperlink | Creates a hyperlink with a display name and URL. | Display Name: "K2" URL: "http://www.k2.com" Result: "<a href= http://www.k2.com > K2</a>" |
Insert | Inserts a substring into a string at a specified position. | Text: "Example" Substring: "00000" Position: 2 Result: "E00000xample" |
Join | Concatenates a list of text values or fields, delimiting each with a separator. | Values: { "1", "2", "3" } Separator: ";" Result: "1;2;3" |
Left | Returns a subset of characters from the left side of a string. | Text: "Test" Length: 1 Result: "T" |
Length | Returns the length of a string. | Text: "Test" Result: 4 |
Mid | Returns a subset of characters from a string, starting at a specified index and continuing to the end of the string. | Text: "Example" Start: 3 Result: "xample" |
Mid - Length | Returns characters from a string, starting at an index and continuing a specified length. | Text: "Example" Start: 2 Length: 5 Result: "xampl" |
Pad Left | Pads a string with a padding character on the left side up to a specified length. | Source String: "Example" Pad Character: "#" Overall Length: 9 Result: "## Example " |
Pad Right | Pads a string with a padding character on the right side up to a specified length. | Source String: "Example" Pad Character: "#" Overall Length: 9 Result: " Example #" |
Proper | Converts a string to proper case. | Text: "the quick brown fox jumps over the lazy dog" Result: "The Quick Brown Fox Jumps Over The Lazy Dog" |
Replace | Replaces a substring within a string with a new substring. | Text: "Ex000le" Find: "000" Replace: " amp " Result: "Example" |
Right | Returns characters from the right side of a string. | Text: "Example" Length: 3 Result: "ple" |
Split | Splits text into substrings delimited by a specified separator value. | Text: "a;b;c" Separator: ";" Result: { "a", "b", "c" } |
To Lower | Converts a string to lower case. | Text: "Example" Result: " example " |
To Upper | Converts a string to upper case. | Text: "Example" Result: " EXAMPLE " |
Trim | Removes leading and trailing spaces and line breaks from a string. | Text: " Example " Result: "Example" |
URL Encode | Encodes a URL string. | URL: "http://local.com/test url.asmx" Result: "http%3a%2f%2flocal.com%2ftest+url.asmx" |
URL Decode | Decodes a URL string. | URL: "http%3a%2f%2flocal.com%2ftest+url.asmx" Result: "http://local.com/test url.asmx" |
The Function wizard content varies according to the function: