Brian Dunning's FileMaker Custom Functions

SortValues2

Sorts the values in a list ascending or descending.

  Average rating: 4.9 (23 votes) Log in to vote

Joshua Paul   Joshua Paul
Neo Code
http://www.neocode.com

Share on Facebook Share on Twitter

  Sample input:
SortValues ( "apple¶grape¶banana" ; True )

SortValues ( "apple¶grape¶banana" ; False )
  Sample output:
apple¶banana¶grape

grape¶banana¶apple

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

NOTE this function written by Theo Ros, this version replaces "list" with "lst"

Returns the list with items sorted

Syntax: SortValues ( list ; sortAscending )
In: list - the return delimited list to search
sortAscending - if True (1), the list will be sorted Ascending,
if False (0), the sorting is Descending

Return type: Text

SortValues ( "apple¶grape¶banana" ; True ) --> "apple¶banana¶grape"
SortValues ( "apple¶grape¶banana" ; False ) --> "grape¶banana¶apple"

This sort uses functions MinValue() and MaxValue()

 

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.

Under construction. Email me your wish list for improvements.