Brian Dunning's FileMaker Custom Functions

MatchValues ( Values ; Pattern ; StartsOrEndsOrPartialOrExact )

Return values by matching Pattern with option (Starts with, Ends with, Partial, Exact).

  Average rating: 5.0 (25 votes) Log in to vote

Koji Takeuchi   Koji Takeuchi
TonicNote, Inc.
https://tonic-note.com

Share on Facebook Share on Twitter

  Sample input:
MatchValues ( "<>aa¶bb¶cc<>" ; "<>" ; "Starts" )
  Sample output:
<>aa

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

MatchValues ( Values ; Pattern ; StartsOrEndsOrPartialOrExact )
2013.02.18, Koji Takeuchi


description:
Return values by matching Pattern with option (Starts with, Ends with, Partial, Exact).
ex1.
MatchValues ( "<>aa¶bb¶cc<>" ; "<>" ; "Starts" )
= <>aa
ex2.
MatchValues ( "<>aa¶bb¶cc<>" ; "bb" ; "Exact" )
= bb
ex3.
MatchValues ( "<>aa¶bb¶cc<>" ; "b" ; "Partial" )
= bb¶cc<>
ex3.
MatchValues ( "<>aa¶bb¶cc<>" ; "b" ; "Exact" )
= ""

 

Comments

Adam   Adam, Portland, OR
Nov 8, 2014
I'm trying to use this function to replace the patternCount function in a portal filter calc, but it doesn't seem to be working. Any help would be appreciated.

I'm using this technique...

http://www.soliantconsulting.com/blog/2013/03/dynamically-filtering-filtered-portals


I want to change it so the portal only displays records that have words that start with the text being searched for.
 
Chris Van Buren   Chris Van Buren, Tintern, UK
Apr 30, 2015
Thanks for the useful CF. It was exactly what I needed!
 

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.

Under construction. Email me your wish list for improvements.