Brian Dunning's FileMaker Custom Functions

ExcludeValues ( MyList ; Out )

to exclude values from a list

  Average rating: 4.8 (13 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:
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, Go To Logistics
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 !
 
RealGrouchy   RealGrouchy
Nov 21, 2020
This seems to add a pilcrow (line break) to the end of the result which needs to be removed (by stripping off the final character).

- RG>
 
Agnes Barouh   Agnes Barouh, Tic Tac
Nov 23, 2020
Hello,
yes, absolutely.
it was a choice, since all the native functions ( filterValues, LeftValues, middleValues etc ) of filemaker which deal with the lists add an "¶" at the end
Thanks you

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: