Brian Dunning's FileMaker Custom Functions

ValuesGreaterThan ( listvalues ; reference )

Returns all values in a list that are greater than the reference; it is referenced by QuickSort ( listvalues ).

  Average rating: 4.6 (28 votes) Log in to vote

Theo Gantos   Theo Gantos
TEKA, Inc.
http://www.tekainc.com

Share on Facebook Share on Twitter

  Sample input:
ValuesGreaterThan ( "A
B
1
2
3
" , 2 )
  Sample output:
3
A
B

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

ValuesGreaterThan( listvalues; reference) returns a list of all values in list that are greater than the reference by comparing the first value; then prepending all other values greater than the reference with a recursive call to itself.

ValuesGreaterThan(listvalues; reference) is used by QuickSort( listvalues) to separate out values that are greater than a particular "pivot" value.

Originally written by Jeremy Bante, but it was lost, so I re-wrote it to make QuickSort(listvalues) work properly. Now there is no reason to EVER use the atrocious BubbleSort again!

I hope everyone enjoys it.

 

Comments

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.