Software Venture Consulting

FileMaker Pro downloads & Resources
FileMaker Custom Functions
FileMaker Web Viewer Examples
FileMaker Pro & Lasso Consulting
Training
FileMaker Books
FileMaker Articles
FileMaker Error Reference

Free Web Tools
Free FileMaker Tools

Personal Pages
Videos
Adventures
Links

Shopping Cart
Shopping Cart

Search:

Free Newsletter
Signup


Contact


Privacy Policy



FileMaker is a registered trademark of FileMaker, Inc. in the U.S. and other countries.

 

 FileMaker Pro Custom Functions

List  |  Show Random  |  Upload  |  Add This to Your Site

SortList ( ValueList ; Sort ; Type )

Rate this function:  

RatingRatingRatingRatingRating
  Average rating: 4.3  (78 votes)
  Discuss this Custom Function

Agnes Barouh, Tic Tac
http://www.tictac.fr/CoinFileMaker/Page.html

To sort a list,

Sample Input:
SortList ( "B¶D¶C¶¶A¶C" ; "Asc" ; "Text" )
Sample Output:
"¶¶A¶B¶C¶C¶D"


 Then copy & paste into FileMaker Advanced's Edit Custom Function window.

Click here to copy To Clip Manager if you have myFMbutler's Clip Manager installed

Description:

-----------------------------------------***
Edit February 28 2014 :
/* UPDATE */ // Updated code February 28 2014 - for adapte to FileMakerGo, FileMakerServer and FileMaker IWP
//Evaluate() has not the same behavior on Go, Server & IWP

// SortList ( ValueList ; Sort ; Type ) v2.5
-----------------------------------------

Carrefull : Parameter is : ValueList ; Sort ; Type and not ValueList ; Type ; Sort
If you change the name "SortList", also change in the variable $sl_Exe

-----------------------------------------
No dependance. Recursive CustomFunction .....
-----------------------------------------

To sort a list
-> ValueList List for sort - ValueCount ( ValueList ) ≤ 100000
-> Sort : Empty or "Asc" or "Des" [Empty = "Asc"]
-> Type : Empty or "Text" or "Number" or "Date" or "Time"or "TimeStamp" [Empty = "Text"]

-----------------------------------------

* Note :
Keep empty value and double value
When you can use ValueListItem(), it's better for timing
< 2000 : 0 to 2 sec but 5000 number : between 12 and 15 secondes

-----------------------------------------

Note: these functions are not guaranteed or supported by BrianDunning.com. Please contact the individual developer with any questions or problems.

This is my Custom Function and I want to edit it

Discuss:

5 most recent comments | Show all 15 comments

We can't edit... it was :

Let ([

L = "1¶2¶15¶25¶10¶3¶3B¶4¶6¶5¶3A¶5A¶";
r = SortList ( L ; "Asc" ; "Text" )

];
SortList ( R ; "Asc" ; "Number" ) // and not L here
)

but is not ok :)
sorry

Agnes, France
October 06, 2016 12:52am

Pardon :)

Perhaps this one are ok :

Let ([

L = "1¶2¶15¶5C¶35¶5B¶25¶10¶3¶3B¶4¶6¶5¶3A¶5A¶";
R = SortList ( L ; "Des" ; "text" )

];
sortList ( R; "Asc" ; "number" )
)

but test and test ( I do not want to go to the code of SortList ; )

Agnes, France
October 06, 2016 12:55am

Pas de Quoi :)

Yep, nice workaround, .... it works.

Understand why you don't want to dive into the code again.
I'll keep it aside, ... for Holliday homework :)

Eric, France
October 06, 2016 10:26am

This function works on v14 but does not on v15.

For example : sortList ($$Alan ; "" ; "Number" ) result : $50247

Could you please assist me ?

Mustafa Ates, Istanbul/Turkey
May 18, 2017 8:29am

Hi,

Could you send me your file by eMail ?
Substitute( filemaker§tictac.fr; §; @ )

Thanks

Agnès

Agnès, France
May 18, 2017 9:32am

Make a comment about this Custom Function (please try to keep it brief & to the point). Anyone can post:

Your Name:
City/Location:
Comment:
characters left. If you paste in more than 1500 characters, it will be truncated. Discuss the function - advertisements and other useless posts will be deleted.
Answer 7 + 9 =
Search for Custom Functions:

Custom Functions Widget
Download the Custom Function Dashboard Widget for OS X
Keep all the latest Custom Functions right at your fingertips!

Newest Custom Functions:

1. decFromHex ( hexValue )
  (Mon, Oct 16, 12:34pm)
2. MonthYearList ( startmonth ; startyear ; numbermonth ; short )
  (Mon, Oct 16, 3:38am)
3. ErrorDescription ( errorNumber )
  (Wed, Sep 27, 2:51am)
4. decodeEntities (text)
  (Wed, Sep 27, 1:22am)
5. HexidecimalToNumber ( HexidecimalValue ; counter )
  (Mon, Sep 25, 12:39pm)
6. FixedFieldConverter ( Fieldname ; f1 ; f2 ; f3 ; f4 ; f5 ; f6 ; f7 ; f8 ; f9 ; f10 ; f11 ; f12 ; f13 ; f14 ; f15 ; f16 ; f17 ; f18 ; f1
  (Fri, Sep 15, 12:34pm)
7. ShannonEntropy ( text )
  (Thu, Sep 07, 5:59am)
8. LetterCount ( text ; summary )
  (Thu, Sep 07, 5:53am)

RSS Feed of Custom Functions