Brian Dunning's FileMaker Custom Functions

MatchPrefixAll ( theList ; thePrefix )

Returns all values from a list that matches the supplied prefix.

  Average rating: 4.3 (34 votes) Log in to vote

Jeremiah Small   Jeremiah Small
Soliant Consulting, Inc.
https://www.soliantconsulting.com

Share on Facebook Share on Twitter

  Sample input:
MatchPrefixAll ( "layout1¶
layout2¶
layout3¶
printReport¶
printInvoice¶
printEstimate¶
layout4¶
layout5¶"
; "print" )
  Sample output:
printReport
printInvoice
printEstimate

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

Updated so List parameter doesn't conflict with native List function.

Returns all values from a list that matches the supplied prefix. This version strips the CR off the end of the result list. For reference, Mike's original revision is included as a comment in the body of the CF above. There is an interesting thread on fmforums.com called "Piggy backing on a CF input parameter" if you are learning about CFs and and care to read a technical discussion about CFs.

 

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.

Under construction. Email me your wish list for improvements.