Brian Dunning's FileMaker Custom Functions

ContainsAllExact ( Text ; SearchStrings )

Checks whether all values in SearchStrings are exactly (capitalization) found in Text

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

Bill Thurmes   Bill Thurmes - Show more from this author
MDCA
http://www.miyotadca.com

Share on Facebook Share on Twitter

  Sample input:
ContainsAllExact ( "Jim Charlie Frank Jane Michelle George Kim Chris" ; "Jim,Chris,Jane" )
ContainsAllExact ( "CA¶CO¶DE¶IA¶MN¶ND¶SD" ; "CA¶DE¶Mn" )
  Sample output:
1
0 (not exact)

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

Purpose: Determine whether Text contains all of the strings contained in SearchStrings ('and' logic), and that those strings are exact matches (useful when ESQL queries depend on the function)
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 and PatternCount.

 

Comments

Log in to post comments.

 

Note: these functions are not guaranteed or supported by BrianDunning.com. 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 20 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: