Loading
Feature Degradation | Agentforce Voice Read More
CRM Analytics
Table of Contents
Select Filters

          No results
          No results
          Here are some search tips

          Check the spelling of your keywords.
          Use more general search terms.
          Select fewer filters to broaden your search.

          Search all of Salesforce Help
          substr Function

          substr Function

          Returns characters from the string, starting at the specified position and of the specified length.

          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.

          Syntax

          substr(string,position,[length])

          Arguments

          Argument Description
          string Dimension field or text string to extract the substring from.
          position The starting character position of the substring. The first character in a string is at position 1. If position is negative, then the position is relative to the end of the string. So a position of -1 denotes the last character.
          length Optional. The number of characters to return. If length is 0, the output is an empty string. If length is negative, then the function returns null.
          Example
          Example You want to return the 13th, 14th, and 15th character from each account ID.
          substr([Account_Id],13,3)
          Enter the function in the Formula section of the Preview tab.
           
          Loading
          Salesforce Help | Article