PositionX ( text ; searchString ; start ; occurrence ; matchcase )
extended Position() function that can also work Case Sensitive
Average rating: 3.9 (37 votes) Log in to vote
|Theo Ros - Show more from this author|
Function definition: (Copy & paste into FileMaker's Edit Custom Function window)
The Position() function in FM7 is always Case Insensitive...
The Substitute fortunately is not.
If you want a case sensitive Position function, use this one,
with final parameter 'matchcase' set to True (1).
In: text - the textfield or literal string you want examined
searchString - the string to look for
start - the position where to start searching
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.
matchcase - if set to True (any value not equal to zero)
the function does a Case Sensitive search.
if False (0) the function behaves Case Insensitive
Syntax: PositionX ( text ; searchString ; start ; occurrence ; matchcase )
Return type: Number
(this is an adaptation of the PositionCS() function by Christian JÃ¤ger)
Note: these functions are not guaranteed or supported by BrianDunning.com. Please contact the individual developer with any questions or problems.