Go to Contents
Previous
Page
Next
Page
Contents > Functions reference (alphabetical list) > Text functions > Position function

Position function
Format

Position(text;searchString;start;occurrence)
Parameters
text - any text expression or text field
searchString - any text expression or text field representing the set of characters you want to find.
start - any numeric expression, or field containing a number, representing the number of characters from the start of the text string at which to begin the search.
occurrence - any numeric expression or field containing a number, representing which instance of the text string you want to find. A negative occurrence value causes the scan to go in the opposite direction from start. A zero value for occurrence is invalid and returns a result of zero.
Data type returned
number
Description
Returns the starting position of the specified occurrence of searchString in text. If searchString isn't contained in text or if there was no specified occurrence, zero is returned. The Position function is not case-sensitive.
Examples
Position("Mississippi";"iss";1;1) returns 2.
Position("Mississippi";"iss";1;2) returns 5.
Position("Mississippi";"iss";3;1) returns 5.
Left(Name;Position(Name;" ";1;1)-1) returns William, when Name is a text field that contains William Smith.
Right(Name;Length(Name) - Position(Name;" ";Length(Name);-1)) returns Smith.
Related topics
Functions reference (category list)
Functions reference (alphabetical list)
About formulas
About functions
Defining calculation fields
Using operators in formulas

Contents > Functions reference (alphabetical list) > Text functions > Position function
Previous
Page
Next
Page