Brian Dunning's FileMaker Custom Functions

list.pattern_filter ( _list ; _value ; _case_sensitive )

Filters list values by text pattern with minimal recursion

  Be the first to rate this function Log in to vote

Mohamed Tawfiq   Mohamed Tawfiq - Show more from this author
CE
https://mhtawfiq.github.io/

Share on Facebook Share on Twitter

  Sample input:
list.pattern_filter ( "ABCD¶DDFG¶GGfG¶FFGG" ; "FG" ; 1 )
  Sample output:
DDFG
FFGG

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

A rewrite of filterLines() function using While() and minimal recursion.

Instead of processing the list line by line it finds the first matching line, jumps to the next line, find the next matching line and so on.

This means that if there are only 4 matches in a list of 20k+ lines, we only need 4 recursions to find them instead of 20k+ making it much faster.

 

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: