Flexmonster Software License Agreement (“Agreement”) has been significantly revised and is effective as of September 30, 2024.
The following modifications were made:
The modified version of Flexmonster Software License Agreement is available here.
Downloading, installing, and/or continuing to use Flexmonster Software after September 30, 2024, constitutes Licensee’s acceptance of the terms and conditions of the modified version of Flexmonster Software License Agreement. If Licensee does not agree to any of these terms and conditions, they must cease using Flexmonster Software and must not download, install, use, access, or continue to access Flexmonster Software. By continuing to use Flexmonster Software or renewing the license under License Model or Maintenance after the effective date of any modifications to Agreement, Licensee accepts and agrees to be bound by the terms and conditions of the modified Agreement.
sortingMethod(uniqueName: String, compareFunction: Function)
[starting from version: 2.6]
Overrides the default ascending order of field members. For more details about overriding sorting order, refer to the Sorting tutorial.
Parameter/Type | Description |
---|---|
uniqueName String | The unique name of the field to which the sorting is applied. |
compareFunction Function | Defines the sort order. The input parameters are the same as for compareFunction of Array.sort() method. |
The following code sets custom sorting where members that begin with a specific letter (e.g., "F"
) are put first, while all other members remain in alphabetical order:
const letterToPutFirst = "F";
pivot.sortingMethod("Contact Last Name", function(a, b) {
if (a.at(0) == letterToPutFirst && b.at(0) == letterToPutFirst)
return a > b ? 1 : -1;
if (a.at(0) == letterToPutFirst)
return -1;
if (b.at(0) == letterToPutFirst)
return 1;
return a > b ? 1 : -1;
});