Skip to main content
Planview Customer Success Center

InStr Function

InStr (str as String, subStr as String, isCaseSensitive as Boolean) as Numeric

Category: Text
Description: Returns the first position of compared text within the text. If not found returns 0. By default isCaseSensitive is equal to FALSE, if set to TRUE then search is case sensitive
Supported Context: FormulaField And BusinessRules
Parameters:  
str as String Represents a text string or reference to a field that returns a value of type text
subStr as String Represents the sub-string or partial text content which you need the location of within the text provided in the "str" parameter
isCaseSensitive as Boolean An optional parameter that indicates whether or not the "subStr" value is case sensitive, where "TRUE" is case sensitive. If null the parameter default value is equal to "FALSE"
Returned value as Numeric Returns the character position of the location of the "subStr" parameter within the "str" parameter
Example #1

Build a workflow rules that automatically marks a user as internal if the email address contains a certain domain (e.g. acme.org, acme.co.uk, acme.co.us). Create the workflow on a user entity and set the trigger to run "Every time a record is created or edited", and set the Action to "Update Field". Set the evaluation criteria to be:

InStr($email,"@acme",FALSE) <> 0

Tips
  • The function In() will let you search for a couple of substrings within a field
  • The returned position value from this function can be used for Left(), Right(), Mid()
  • Review other useful text related functions
Related Functions

Left()

Right()

Mid()

In()