Brian Dunning's FileMaker Custom Functions

ExcludeValues ( MyList ; Out )

to exclude values from a list

  Average rating: 4.8 (12 votes) Log in to vote

Agnes Barouh   Agnes Barouh
Tic Tac
http://www.tictac.fr/CoinFileMaker/Page.html

Share on Facebook Share on Twitter

  Sample input:
ExcludeValues ( "a¶b¶c¶d¶e¶f" ; "b¶d¶e" )
--------
ExcludeValues ( "I¶want¶to¶exclude¶words¶from¶list¶simply" , "want¶to¶some¶I" )
  Sample output:
a¶c¶f¶
--------
exclude
words
from
list
simply

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

// ExcludeValues(MyList ; Out) v1.0
//————————--—-----------------

to exclude values from a list.

Not case sensitive and not recursive

Used UniqueValues() => not runtime compatible
need v16

 

Comments

Joshua Willing   Joshua Willing, Willing Apps
Mar 21, 2018
This is quite genius.
 
Agnès   Agnès, Paris
Mar 23, 2018
the code is mostly quite simple ;)
Thank you !
 
Omelyan Burtnyk   Omelyan Burtnyk
Mar 24, 2018
Well done
Thank you
 
Bruce Robertson   Bruce Robertson
Mar 25, 2018
Very nice! Simple, handles lists with long list of duplicates easily and correctly.
 
19752   19752, fmc
Mar 26, 2018
There is a TIP "shorter list first in FilterValues()", so changing parameter order in FilterValues() would make it a bit faster generally.
 
Agnès   Agnès, Paris
Mar 27, 2018
Hi,

With all his years, I'm not looking for speed any more in Filemaker.
But you're right to point it out
In fact, if we want to optimize the code, we must put a Let for each calculation is the fastest :
let ([
Prepa = Substitute ( Out & ¶ ; [¶ ; Char (8203 ) & ¶]) ;
Unic = UniqueValues ( Prepa & MyList )
];
FilterValues ( Unic ; MyList )
)

Merci à tous, ravie que ce calcul vous interpelle !
 

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.