Brian Dunning's FileMaker Custom Functions

ValuesLessThanOrEqual ( list ; reference )

ValuesLessThanOrEqual( list; reference) returns all values in list that are less than or equal to reference; it's used by QuickSort( list).

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

Jeremy Bante   Jeremy Bante
OshVay Systems, Inc.
http://www.oshvay.com

Share on Facebook Share on Twitter

  Sample input:
ValuesLessThanOrEqual(
"Tye
Mineko
Leia
Giang
Promise
Helen
Leilani
Megan
Alix
Leslie
Heather
Laura
Emilie
Wen-Lian
Marisa
Tricia
Hana
Arianna"; "Leia
")
  Sample output:
Giang
Helen
Alix
Heather
Laura
Emilie
Hana
Arianna

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

ValuesLessThanOrEqual( list; reference) returns a list of all values in list that are less than or equal to reference by comparing the first value; then concatenating all other values less than or equal to reference with a recursive call to itself.

ValuesLessThanOrEqual() is used by QuickSort( list) to separate out values that are less than or equal to a particular "pivot" value.

 

Comments

Bill Doerrfeld   Bill Doerrfeld, Seattle
Oct 19, 2009
The equals part isn't quite working. For example, with the following you only get "friday". If you add a blank space after the reference such as "mon " then it also matches "mon".
ValuesLessThanOrEqual ( "mon¶monday¶friday¶saturday" ; "mon" )
 
Eric   Eric, SJSU
Sep 14, 2018
(list)
The selected name cannot be used because it

• contains: + - * / ^ & = ≠ < > ≤ ≥ ( , ; ) [ ] " :: $ }
• contains: AND, OR, XOR, NOT
• begins with a digit or a period
• or has the same name as a function, parameter or keyword.
 

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: