Brian Dunning's FileMaker Custom Functions

RemoveWords ( text ; toRemove )

Eliminates any/all words in a list from text

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

Tim Anderson   Tim Anderson - Show more from this author
Tim Anderson Group

Share on Facebook Share on Twitter

  Sample input:
RemoveWords ( "Leave only result" , "only¶leave" )
  Sample output:
result

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

Very obviously based on the RemoveValues function, adapted to remove words from text. Created because I wanted to be able to remove common words from company name fields for simplified searching. For example when searching for 'The Filemaker Developers Company ltd' I will have a global for the toRemove containng words and abbreviations such as 'the', 'ltd', 'inc', 'co' giving me a key field of 'Filemaker Developers Company'. Then i will break this down using FilterKey nad FieldBeginsWith functions

 

Comments

Jamie Woods   Jamie Woods, Brisbane, Australia
Feb 2, 2015
This doesn't work when trying to use a Script Parameter.
Workaround;
Set the Script Parameter as a Variable at the beginning of a script

Example;

Set Field[gField::g1;RemoveWords(gField::g1;get(ScriptParameter)]

Does not work.
but,

Set Variable [$SP; Value:Get(ScriptParameter)]

Set Field[gField::g1;RemoveWords(gField::g1;$SP]
Does work.
 

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:

Under construction. Email me your wish list for improvements.