Brian Dunning's FileMaker Custom Functions

RemoveByValueList ( text ; valueList )

Removes matching words from a text string, based upon words contained in a value list.

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

Jonathan Mickelson   Jonathan Mickelson - Show more from this author

Share on Facebook Share on Twitter

  Sample input:
RemoveByValueList ( "Joe Smith III" , "II¶III¶Esq.¶Sr." )
  Sample output:
Joe Smith

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

Removes matching words from a text string, based upon words contained in a value list.

How it works (because the principal can be used for many different problems):

Basically it substitutes the ¶'s in the value list with the necessary syntax for array of values. This text is prepared as if you manually built it and then is Evaluated to execute it. After the execute a TrimAll is performed to remove extra spaces.

 

Comments

Jonathan Mickelson   Jonathan Mickelson
Dec 7, 2009
I updated the calc, the previous paste must have stripped necessary escape characters.
 
Monty Lewis   Monty Lewis, Gloucester, MA
Aug 12, 2010
This is a great function. I was wondering if anyone knows of a way to do the opposite of this and return the matched value of a value list item instead of removing it.

Thanks, Monty
 
César Rodríguez   César Rodríguez
Nov 28, 2019
Hi,
He don't remove words, remove text.

example:

RemoveByValueList ( "The example text to remove o not remove." , "o¶" )

result: "The example text t remve nt remve."

The word "o" not existe but replace anyway.

Best regards
 

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: