Brian Dunning's FileMaker Custom Functions

Exclude ( TextToFilter ; FilterText )

Exclude the characters to be filtered

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

Agnes Barouh   Agnes Barouh - Show more from this author
Tic Tac
http://www.tictac.fr/CoinFileMaker/Page.html

Share on Facebook Share on Twitter

  Sample input:
Exclude ( "Exclude character strings" ; "aeiouy" )


Exclude ( "test Quotes, \“left and right\” quotes" ; "\”" )
  Sample output:
Excld chrctr strngs


test Quotes, “left and right quotes

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

* june, 28, 2010 . chonge just order parameter
$Exc_Text = TextToFilter ; $Exc_No = FilterText ;
instead of
$Exc_No = FilterText ; $Exc_Text = TextToFilter ;
for FileMaker give correctly parameter TextToFilter and FilterText and not vice versa when you copy paste the code.
* October, 1. : calculation modified for smart quotes, return the same processing of filter() substitute(), position() : left quotes or right quotes.

-----------------------------------------
it is not a recursive function
-----------------------------------------

limited version : FilterText ≤ 404 characters
/* "Unlimited" version with CustomList()
http://www.briandunning.com/cf/868*/

/* For Exclude value, used FilterList()
http://www.briandunning.com/cf/771*/

-----------------------------------------
Respect case sensitive and accents [like Filter()]
Respect smart quotes "”“ and apostrophizes '‘’ [like Filter()]
-----------------------------------------

Exclude ( "zTha01nXks yap 35loxtY !!!?" ; "0134589ypXxKYZz?" )

-----------------------------------------

 

Comments

Casey Dutkus   Casey Dutkus
Apr 27, 2009
Great! Why filemaker doesn't have a reverse Filter like this is beyond me.
 
Edward Souza   Edward Souza, São Paulo, SP, Brazil
Nov 4, 2009
Incredible CF -- as all other CFs designed by Mlle. Barouh are. Thank you for sharing.
 
Eric Ruff   Eric Ruff, Gainesville
Jun 27, 2010
I am trying to filter out multiple paragraph marks ¶
from long strings of text. Exclude() doesn't filter them out as far as I can tell. Any way to strip those as well?
 
Agnès   Agnès, Paris
Jun 27, 2010
Hello,

I'm not sure to understand correctly the problem...

Esclude ( MyText ; "(¶. )" ) removes all ( ¶ . space and ) from MyText. not for you ?

but if it's only for remove all ¶, Substitute ( MyText ; "¶" ; "" ) it's better.

Thanks a lot for comments !
 
Karen   Karen, nyc
Oct 4, 2011
Thanks!
Using this to create valid file names for PDFs; e.g. TextToFilter being "/?%*:|<>.\\\""
Now to look for a way to filter out words and phrases....
 
flusheDData   flusheDData, n/a
Nov 23, 2020
Hi Agnes,
What kind of genius are you?
Thank your for sharing. I am still trying to figure out the internals of your function, but I guess it has something to do with the internal Substitute's iterations.
A little thing I would suggest is to add
& Let ( [ $Exc_Text = "" ; $Exc_No = "" ; $Exc_n = "" ] ; "" )
to delete the local variables.

I am looking forward to your publishing a document or book with all yor amazing tricks.

Merci,
Best regards.
Miguel a.k.a. flusheddata
 
Agnes Barouh   Agnes Barouh, Tic Tac
Nov 23, 2020
Hello Miguel !
Thank you for your nice words! I take ;)
Yes you can ! and it is cleaner as well

Merci beaucoup d'utiliser et de rentrer dans le code !!

Agnès
 

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: