Use string functions to create values in a formula field based on one or more dimension columns in your recipe or strings. For example, you can change the casing of text strings, concatenate values from multiple columns, and replace values.
Required Editions
| Available in Salesforce Classic and Lightning Experience. |
| Available with CRM Analytics, which is available for an extra cost in Enterprise, Performance, and Unlimited Editions. Also available in Developer Edition. |
You can use a formula to manipulate strings, instead of dataflow transformations, to perform multiple string manipulations at the same time. For instance, you can nest string functions in the formula editor to combine the sales territory and country into a single field and apply title casing to the values.
title(concat([Sales_Territory], " ",[Country]))
When entering a formula, text strings must be enclosed in double straight quotes ("This is a string."). Column names must be enclosed in square
brackets ([Opportunity_Name]).
- concat Function
Returns a string by concatenating the values of the specified columns and input strings. For example, to display the close date as MM-DD-YYYY, concatenate the Close_Date_Month column, Close_Date_Day column, and Close_Date_Year column, and add a dash between each of them. - lower Function
Returns a string with all characters from the input string in lowercase. If the input string is null, then the result is null. - ltrim Function
Removes the specified substring from the beginning of a string. To remove leading spaces, do not specify a substring. - replace Function
Replaces a substring with the specified characters. If any of the arguments are null, then the function returns null. This function is case-sensitive. - rtrim Function
Removes the specified substring from the end of a string. To remove trailing spaces, do not specify a substring. - substr Function
Returns characters from the string, starting at the specified position and of the specified length. - title Function
Returns the string with the initial character of every word in uppercase and the remaining characters in lowercase. For example, “united states” becomes “United States.” - trim Function
Removes the specified substring from the beginning and end of a string. To remove leading and trailing spaces, do not specify a substring. - upper Function
Returns the string with all characters in uppercase. If string is null, then the result is null.