Skip to main content

 

Planview Customer Success Center

Contains Function

Contains (text as String, value as String, isCaseSensitive as Boolean) as Boolean

Category: Logical
Description: Checks if a field contains a specified value and returns a TRUE or FALSE value. For isCaseSensitive, enter a value of TRUE or FALSE, default value is equal to FALSE.
Supported Context: FormulaField And BusinessRules
Parameters:  
text as String Text as string value, or reference to a field that returns a string value (i.e text fields, or conversion of non-text fields using the ToString function)
value as String Represents the value, or portion of the value, of the field or string specified in the "Text" parameter
isCaseSensitive as Boolean This optional parameter allows you to decide if the expression will be Case Sensitive when triggered. Accepts a value of "TRUE" or "FALSE", if parameter is not entered then by default the parameter value will be "FALSE" meaning it will not be Case Sensitive
Returned value as Boolean Returns a boolean value equal to "TRUE" if the "Text" parameter contains the value specified in the "Value" parameter, or "FALSE" if it does not
Example #1

Build a workflow rules that automatically marks a user as internal if the email domain contains a specific organization (e.g.:acme.org, acme.co.uk, acme.co.us, etc). Create the workflow rule on the User entity and set the Trigger to "Each time a record is created or edited" with an action of "Update Field" (set to FALSE) and set the Evaluation Criteria to be:

Contains($email,"@acme")

Notes The Contains function can only be used for string and text values. The function does not work for strings containing a + character followed by text, so 'text +' works but 'text + more text' does not. A workaround is to use ToString() around the text. Example: Contains(ToString($Name), "some text", FALSE).