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:
9.3
9.4
9.5
10.0
10.1
10.2
10.3
10.4
10.5
10.6
Statistic
FMM
Blog
List.Sort
Sorts the list.
| Component | Version | macOS | Windows | Linux | Server | FileMaker iOS SDK |
| List | 4.2 | Yes | Yes | Yes | Yes | Yes |
Parameters
| Parameter | Description | Example | Flags |
|---|---|---|---|
| List | The list to sort. | "Hello" ¶ "World" | |
| 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. Add 16 for number sorting (new in 7.5). |
1 | Optional |
| NoReturnEnding | Pass 1 to have no extra newline character on the end of the returned list. Default is 0 to include one to easily concat lists. | 1 | Optional |
Result
Returns new list.
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.
Version 7.5 adds number sorting.
Examples
Sort case sensitive:
MBS( "List.Sort"; "Hello¶World¶Test" )
Sort case insensitive:
MBS( "List.Sort"; "Hello¶World¶test"; 1 )
Sort case sensitive and descending:
MBS( "List.Sort"; "Hello¶World¶Test"; 2 )
Sort case insensitive and descending:
MBS( "List.Sort"; "Hello¶World¶test"; 3 )
Sort German dates:
Show Custom Dialog [MBS("List.Sort"; "01.01.2001¶12.04.1981¶01.04.1981¶12.07.1981¶12.01.1981¶23.11.2014"; 4; 0)]
Sort US dates:
Show Custom Dialog [MBS("List.Sort"; "01/01/2001¶04/12/1981¶04/01/1981¶07/12/1981¶01/12/1981¶11/23/2014"; 8; 0)]
Sort numbers
MBS( "List.Sort"; "1¶555¶7"; 16 )
Example result:
"1
7
555
"
See also
- Files.List
- FontManager.ListFontFamilies
- FontManager.ListFonts
- List.Not
- List.SortWithEvaluate
- QuickList.DeCombine
- QuickList.Sort
- QuickList.SortWith
- QuickList.SortWithEvaluate
Example Databases
Blog Entries
- Sort with evaluate in FileMaker
- MBS FileMaker Plugin, version 8.3pr2
- MBS FileMaker Plugin, version 7.5pr5
- MBS FileMaker Plugin, version 6.2pr1
- New functions for MBS FileMaker Plugin coming soon
- MBS Filemaker Plugin, version 4.4pr4
- MBS Filemaker Plugin, version 4.4pr3
- MBS Filemaker Plugin, version 4.2pr11
Release notes
- Version 10.6
- Added mode 16 for number sorting to QuickList.SortWith function.
- Version 10.2
- Added List.SortWithEvaluate and QuickList.SortWithEvaluate functions to sort lists with custom expression.
- Version 8.3
- Improved List.Sort to better sort numbers.
- Version 7.5
- Added number sort mode for List.Sort.
Created 18th August 2014, last changed 1st November 2017
List.SetValue - List.SortWithEvaluate
Feedback: Report problem or ask question.
Links
MBS Xojo Chart Plugins