
The function SUBSTITUTE(text, old_text, new_text) returns text with any instance of old_text substituted with new_text, much like the find and replace function in a text editor. Salesforce includes other functions for working with and formatting text in formulas. For more information, see Formula Operators and Functions in Salesforce online help.
Full Answer
How to use text in formulas in Salesforce?
Salesforce comes with many functions and operators that make it easy to work with Text in formulas. Using formulas, you can convert other data types to Text and concatenate Text values together or search for a specific string within a Text field. TEXT () converts a Percent, Number, Date, Date/Time, picklist, or Currency field into Text.
How to replace the values using Salesforce formula field?
How to Replace the values Using Salesforce Formula field. We can easyily remove the last character from a string by using the SUBSTITUTE() in the Formula. For Instance, If value__c is a string (TheBlogReaders.com) and we can replace from .com to .net using following formula. Formula: SUBSTITUTE(value__c, ‘.com’, ‘.net’) Result: TheBlogReaders.net
How do I use the substitute function in Salesforce?
The function SUBSTITUTE (text, old_text, new_text) returns text with any instance of old_text substituted with new_text, much like the find and replace function in a text editor. Salesforce includes other functions for working with and formatting text in formulas.
How to reference auto number fields as text fields in Salesforce?
Reference auto-number fields as text fields in formulas. If the num_chars value is less than zero, Salesforce replaces the value with zero. The LPAD and RPAD functions are used to insert characters you specify to the left-side and right-side of a text string respectively. The syntax of these functions are –

How do I change a text field to a formula field in Salesforce?
Is it possible to change the Field Data Type from Text to Formula in Salesforce Object? No, its not possible. Formula fields are a read-only fields that cannot be converted to any other data type. Likewise, you cannot convert any other field type into a formula field.
What is substitute in formula in Salesforce?
Replaces a substring with the specified characters. If any of the arguments are null, then the function returns null. This function is case-sensitive.
Can we use text area in formula field in Salesforce?
Saurabh. Rich/long text area fields aren't available for formulas. If you need to pull this information through I think you'll need to use a workflow field update or trigger to copy it. Unfortunately the Workflow Field Update also loses the markup so best to stick to Apex Trigger solution.
How do I use text formulas in Salesforce?
To insert text in your formula field, surround the text with quotation marks. For example, to display “CASE: 123,” use this formula "CASE: "& CaseNumber__c . Use the backslash (\) character before a quote or backslash to insert it as a literal value in your output.
How do I use the substitute function in Salesforce?
Salesforce has a Substitute function that you can use in formulas. Its syntax like SUBSTITUTE(TEXT(GEO__c), "India", "IND") . You would need one of those substitutions for each value which will get cumbersome as you add values.
What does == mean in Salesforce formula?
Evaluates if two values are equivalent. The = and == operators are interchangeable. <> and != (Not Equal) Evaluates if two values aren't equivalent. < (Less Than)
How do I use the long text area in a Formula field in Salesforce?
1. Create Custom Number FieldSetup | Customize | Cases | Fields.Click New button in Case Custom Fields & Relationships.Select Number and Next.Enter Label, Length and Description.Click Next to continue and follow the wizard to save.
What is the function of text area?
How do I create a custom text field in Salesforce?
Try It YourselfIn your Salesforce org, click. ... Click the Object Manager tab. ... From the Object Manager. ... From the sidebar, click Fields & Relationships. ... Click New to create a custom field. ... Next, choose a data type.More items...
What type of formula can we use in a text value?
Answer. Answer: The Excel TEXT Function is used to convert numbers to text within a spreadsheet. Essentially, the function will convert a numeric value into a text string.
What is formula text in Salesforce?
Salesforce comes with many functions and operators that make it easy to work with Text in formulas. Using formulas, you can convert other data types to Text and concatenate Text values together or search for a specific string within a Text field.
How do I concatenate fields in Salesforce?
You can use the +symbol to concatenate two or more fields values in the formula of the salesforce process builder.
What does compare_text return?
BEGINS (text, compare_text) returns true if text begins with compare_text. Similarly CONTAINS (text, compare_text) returns true if compare_text is anywhere in text. These functions are useful for displaying information conditionally based on a text field.
What is a helper field?
Helper Formula Fields. Using helper formula fields is a great way to make your formulas short and easy to understand. A helper field does only part of a larger calculation and is referenced by the end formula field. You can use helper formula fields with any type of formula, but let’s look at an example right now.
Can you use text in Salesforce?
Salesforce comes with many functions and operators that make it easy to work with Text in formulas. Using formulas, you can convert other data types to Text and concatenate Text values together or search for a specific string within a Text field.