Understanding Sorting in Tonkean
Sorting behavior in Tonkean varies depending on the widget or interface you’re using. Different areas of the platform apply different sorting methods, which means the same field may appear in a different order across views.
These differences are most apparent when viewing the same or related data in different interface widgets. For example, the Line Items widget uses natural sorting (that is, number-aware text sorting) while the Data Source Items widget uses server-side sorting that works to align the sorting method with the particular data source. In other areas, like field dropdowns, people pickers, and so on, the platform employs alphabetical (lexicographic) sorting.
The subsections below provide more detail about these varying sorting strategies, along with illustrative examples.
Natural Sorting (Number-Aware Text Sorting)
Some widgets, like the Line Items interface widget, use natural sorting, which compares text and numbers separately within the same value. When a value contains both letters and numbers, Tonkean compares it in segments:
Text segments are compared alphabetically (A → Z)
Number segments are compared numerically (2 < 10 < 100)
For example,
Apple1appears beforeApple2Apple2appears beforeApple10REQ-2appears beforeREQ-11
If a value starts with a number, the number is compared first. For example: 52ABC appears before 123ABC.
This behavior matches what many users expect from “number-aware” sorting.
Alphabetical (Lexicographic) Sorting
Some lists and tables use standard alphabetical sorting. In this case, values are compared character by character. For example: REQ-11 appears before REQ-2.
Many dropdowns, selectors, and filter value lists use alphabetical sorting. For many data sets, especially those without combinations of numbers and letters in their values, this sorting method is what most users expect, but for other data sets, this method can result in unexpected orders, as in the example where REQ-11 appears before REQ-2 (because 1 comes before 2).
Server-side Sorting
Some widgets (such as certain Data Source Items views and inner item tables) use server-side sorting. In these cases, sorting behavior depends on the backend rules for the specific field and data source. Tonkean relies on the native sorting method or rules applied by the integrated data source.
Why Sorting May Appear Inconsistent
Because different widgets use different sorting methods, the same field may appear in a different order across the platform. Each widget in Tonkean uses the sorting method that best fits the type of data users typically manage in that context. For example:
The Line Items widget often displays IDs, request numbers, or values that include numeric sequences. Natural sorting ensures that values such as
REQ-2appear beforeREQ-11, which aligns with user expectations.Data-driven widgets rely on server-side sorting to remain consistent with the connected system’s data model and backend logic.
Rather than applying a single universal sorting rule across the platform, Tonkean applies the method that provides the clearest and most intuitive experience for the expected data in each area (although this is obviously not a perfect structure, as some users will have differing data sets or corner cases).