Brian Dunning's FileMaker Custom Functions

ContainsExact ( Text ; SearchStrings )

checks whether at least one of the values in SearchValues is an exact match for a portion of Text

  Average rating: 3.5 (2 votes) Log in to vote

Bill Thurmes   Bill Thurmes - Show more from this author

Share on Facebook Share on Twitter

  Sample input:
ContainsExact ( "CA" ; "GA;FL;MN;CA" )
ContainsExact ( "LeBron James" ; "Lebron" )
ContainsExact ( "Jim,Jane" ; "m\,J" )
  Sample output:
0 (not the same capitalization)

  Function definition: (Copy & paste into FileMaker's Edit Custom Function window)

Purpose: Determine whether Text contains any of the strings contained in SearchStrings ('or' logic) and that those strings are exact matches (useful when ESQL queries depend on the function). I found it useful, in concert with TableNames, LayoutNames, and conditional formatting, to determine whether entries for layout or table names were capitalized correctly.
Similar to Position function but will assess several SearchStrings, gives 0 or 1 (No or Yes) as Result
Restriction: the following !-containing strings may not be part of SearchStings: !c! !s! !p!
4/27/17 - A shortcoming of this occurred to me: this only checks the first incidence of the SearchStrings value in Text. Thus, ContainsExact ("Remark Mark"; "Mark") would evaluate as 0 because the first "mark" is not an exact match for the SearchString. I haven't yet come up with a fix for this. 4/27/17 - Solved it! Combo of Substitute & PatternCount



Log in to post comments.


Note: these functions are not guaranteed or supported by Please contact the individual developer with any questions or problems.

Support this website.

This library has been a free commmunity resource for FileMaker users and developers for 16 years. It receives no funding and has no advertisements. If it has helped you out, I'd really appreciate it if you could contribute whatever you think it's worth: