Loading
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
          trim Function

          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.

          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

          Tip
          Tip Use the trim function in a SAQL query to trim other types of characters.

          trim(string,[substring])

          Arguments

          Argument Description
          string Dimension field or text string to remove the specified substring from.
          substring Optional. The value removed from the string.
          Example
          Example

          You want to remove the two leading spaces before and after a string.

          trim("  Spaces Before and After  ")
          Enter the function in the Formula section of the Preview tab.
           
          Loading
          Salesforce Help | Article