Skip to main content
Planview Customer Success Center

Trim Function

Trim (text as String) as String

Category: Text
Description: Removes all spaces from a text string except for single spaces between words
Supported Context: FormulaField And BusinessRules
Parameters:  
text as String Represents a text string or reference to a field that returns a value of type text
Returned value as String Returns a text string value equal to the text specified in the "text" parameter with all spaces removed except for single spaces between words
Example #1

Create a formula on a description field that will remove spaces from the start and end of a text string. For example, "this is a test " will return "this is a test".

Trim($Description)

Tips
  • The Trim() function is useful for string comparisons
  • Use the trim function whenever you use Contains() or In() to make sure you are trimming unnecessary spaces from compared strings
Related Functions

Contains()

In()