FirstMatchIndex ( values ; string )
Returns the index of the first value that contains the search string.
Average rating: 4.0 (25 votes) Log in to vote
Richard Dyce - Show more from this author
Dyce & Sons Ltd.
FirstMatchIndex ( "abc¶023¶abc¶def¶123¶def"; "XYZ")
Function definition: (Copy & paste into FileMaker's Edit Custom Function window)
A quick function to return the index of the first value in 'values' that contains the search 'string'. If the string isn't found returns 0.
Feb 26, 2016
|FirstMatchIndex ( "Alfred¶Betty¶Fred¶George" ; "Fred" ) returns 1 instead of the expected 3. This is because you're not testing for the position of the string *as a value*.
ValueCount ( Left ( values ; Position ( ¶ & values & ¶ ; ¶ & string & ¶ ; 1 ; 1 ) ) )
Note: these functions are not guaranteed or supported by BrianDunning.com. Please contact the individual developer with any questions or problems.