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.5
11.0
11.1
11.2
11.3
11.4
11.5
12.0
12.1
12.2
Statistic
FMM
Blog
List.SortWithEvaluate
Sorts a list with using an expression to evaluate.
Component | Version | macOS | Windows | Linux | Server | iOS SDK | License |
List | 10.2 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | Paid |
Parameters
Parameter | Description | Example | Flags |
---|---|---|---|
List | The list to sort. | "Hello" ¶ "World" | |
Expression | The expression to evaluate. Can include "leftValue" and "rightValue" as variables. |
"leftValue > rightValue" | |
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 OK or error.
Description
Sorts a list with using an expression to evaluate.The expression is run every time two values are compared, so keep it quick. It should return 1 if leftValue is smaller than rightValue.
Our normal List.Sort is faster due to not having the overhead of evaluating expressions.
Examples
Sort numbers numeric with GetAsNumber() function:
MBS("List.SortWithEvaluate"; "1¶22¶3"; "GetAsNumber(leftValue) < GetAsNumber(rightValue)")
Example result:
1
3
22
Sort dates with using GetAsDate:
MBS("List.SortWithEvaluate"; "1/1/2000¶2/22/2020¶3/4/1998"; "GetAsDate(leftValue) < GetAsDate(rightValue)")
See also
Release notes
- Version 10.2
- Added List.SortWithEvaluate and QuickList.SortWithEvaluate functions to sort lists with custom expression.
Blog Entries
- Neues MBS FileMaker Plugin 10.2
- MBS FileMaker Plugin 10.2 - More than 6200 Functions In One Plugin
- MBS FileMaker Plugin, version 10.2pr3
- Sort with evaluate in FileMaker
Created 9th April 2020, last changed 13th May 2020
Feedback: Report problem or ask question.
