Brian Dunning's FileMaker Custom Functions

ExcludePartialValues ( values ; string )

Remove matches from a list that include string

  Average rating: 4.2 (20 votes) Log in to vote

Richard Dyce   Richard Dyce - Show more from this author
Dyce & Sons Ltd.
http://dyce.com

Share on Facebook Share on Twitter

  Sample input:
ExcludePartialValues ( "Item List¶item_scripting¶User List¶user_scripting¶Prefs" ; "_scripting" )
  Sample output:
Item List
User List
Prefs

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

This is just a convenience function to pull non-scripting values from a list of current layouts.

 

Comments

Agnès   Agnès, France
Apr 26, 2016
Hi,

You can have the same result without recursion

Let ([

L = "Item List¶item_scripting¶User List¶user_scripting¶Prefs" ;
No = "_scripting" ;
Ln = Substitute ( Upper ( L ) ; Upper ( No ) ; "" ) // or no upper for case sensitive

];
FilterValues ( L ; Ln )
)
 
Richard   Richard, Zuchwil
Apr 26, 2016
Agnès, that's very cool. (Slapping my forehead)
 
Bruce   Bruce, Redmond WA
Apr 26, 2016
Shouldn't you trap for multiple values in string?

Let ([

L = "Item List¶item_scripting¶User List¶user_scripting¶Prefs" ;
No = "_scripting¶Item" ;
Ln = Substitute ( Upper ( L ) ; Upper ( GetValue(No;1) ) ; "" ) // or no upper for case sensitive

];
FilterValues ( L ; Ln )
)
 

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 15 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: