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 - Show more from this author
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.

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: