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. WorkingDateList (StartDate;EndDate;HolidayList)
  (Fri, Jan 12, 9:30am)
2. _cf_Returns.Drawdown ( PeriodCount ; IncomingArray ; DrawdownSoFar ; MaxDrawdown ; Type )
  (Wed, Jan 10, 8:08pm)
3. LastMonth_withYear ( Date2Process )
  (Wed, Jan 10, 10:46am)
4. list.ToSqlIn ( theList )
  (Sun, Jan 07, 7:29am)
5. fnValidMBI ( MBI )
  (Sat, Jan 06, 10:29am)
6. mapJoin(pre; sep; post; str; i; values)
  (Fri, Jan 05, 11:48am)
7. CheckDigit_swissUID ( swissUID )
  (Thu, Jan 04, 6:06am)
8. @GetAsURLDecoded ( url ; counter )
  (Fri, Dec 22, 11:00pm)

RSS Feed of Custom Functions