Brian Dunning's FileMaker Custom Functions

MatchPrefix ( theList ; thePrefix )

Returns first value in a list that matches the supplied prefix.

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

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

Share on Facebook Share on Twitter

  Sample input:
MatchPrefix ("
ItemA1¶
ItemB1¶
ItemB2
" ; "ItemB" )
  Sample output:
ItemB1

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

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

Returns the first value from a list that matches the supplied prefix.

This CF was designed to aid in window management. When the list supplied is the function WindowNames, the CF returns the first open window name that matches the supplied prefix. Used in conjunction with a looping routine that is run prior to opening a new window with the name "Example", you can ensure that any existing windows that begin with "Example" are closed before invoking the new "Example" window. This is useful in defeating proliferation of windows created with the New Window command that share the same base name as their master window, but have numbered suffixes.

 

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.