Topics   All   MacOS (Only)   Windows (Only)   Linux (Only, Not)   iOS (Only, Not)  
Components   Crossplatform Mac & Win   Server   Client   Old   Deprecated   Guides   Examples   Videos
New in version: 10.1   10.2   10.3   10.4   10.5   11.0   11.1   11.2   11.3   11.4    Statistic    FMM    Blog  

QuickList.Sort

Sorts the list.

Component Version macOS Windows Linux Server iOS SDK
List 4.4 ✅ Yes ✅ Yes ✅ Yes ✅ Yes ✅ Yes
MBS( "QuickList.Sort"; ListRef { ; Flags } )   More

Parameters

Parameter Description Example Flags
ListRef The reference to the list returned from QuickList.New function. $List
Flags Optional, whether to sort case insensitive or descending.
Pass 1 to sort case insensitive or 0 to sort case sensitive.
Add 2 to sort descending.
Add 4 for sorting dates in DD.MM.YYYY style and 8 for sorting dates in MM.DD.YYYY style.
1 Optional

Result

Returns OK or error.

Description

Sorts the list.
Version 6.2 adds new modes for date sorting. Mode 4 for DD.MM.YYYY style and mode 8 for MM.DD.YYYY style.

Add mode 16 for flags to sort by numbers for version 11.0.

Examples

Sort a list:

Let
([
l = MBS("QuickList.New"; "a¶e¶ä¶f¶1");
r = MBS("QuickList.Sort"; l);
list = MBS("QuickList.GetList"; l);
r = MBS("QuickList.Free"; l)
]; list )

Sort a list ascending case sensitive:

Let
([
l = MBS("QuickList.New"; "A¶e¶ä¶Ä¶9¶1");
r = MBS("QuickList.Sort"; l);
list = MBS("QuickList.GetList"; l);
r = MBS("QuickList.Free"; l)
]; list )

Sort a list descending case insensitive:

Let
([
l = MBS("QuickList.New"; "A¶e¶ä¶Ä¶9¶1");
r = MBS("QuickList.Sort"; l; 3);
list = MBS("QuickList.GetList"; l);
r = MBS("QuickList.Free"; l)
]; list )

See also

Release notes

Blog Entries

Created 21st September 2014, last changed 28th November 2020


QuickList.SetValue - QuickList.SortWith

Feedback: Report problem or ask question.




Links
MBS FileMaker Plugins

Start Chat