Substring()
Returns a portion of a string, beginning at a specified character position. You can optionally specify the length of the substring to return.
| Marketing Cloud Engagement | ✅ Yes |
| Marketing Cloud Next | ✅ Yes |
This function became available in Marketing Cloud Next during the Summer ’26 release (API version 67.0).
The Substring() function has three parameters:
sourceString(string): Required. The string that contains the substring you want to identify.startPosition(number): Required. The character position to begin the substring. If the specified character position exceeds the length ofsourceString, the function returns an empty string.substringLength(number): The number of characters to return after the initial character. If you don’t specify a length, the substring continues to the end of the string.
This example uses the Substring() function to remove part of a string of text and return the result.
The example returns the specified substring.