How To Properly Sort Numerically Named Knowledgebases
about 13 years ago
| Article no. 5017
0 stars
0 ratings
THIS ARTICLE APPLIES TO:
All versions of Knowledgebase
ISSUE DESCRIPTION:
When knowledgebase names include numerals, the sort order appears broken if the list contains more than nine items. Here is an example:
ROOT CAUSE:
When creating numerically named knowledgebases, the author expects them to be displayed numerically; but the use of the alphabetic sorting in Knowledgebase causes the items to be displayed differently than the expected numerical sort order.
As can be seen in the example above, the alphabetic sorting dictates that items beginning with "1" must come before items beginning with "2", and so on. That's why 1, 10, 11, 12, 13, and 14 are appearing before 2, and why 20, 21, 22, 23, and 24 appear before 3, etc.
As can be seen in the example above, the alphabetic sorting dictates that items beginning with "1" must come before items beginning with "2", and so on. That's why 1, 10, 11, 12, 13, and 14 are appearing before 2, and why 20, 21, 22, 23, and 24 appear before 3, etc.
SOLUTION OR WORK AROUND:
While the sort order is actually obeying the alphabetic sort logic used, it appears to be broken due to the difference between numeric and alphabetic sorting expectations.
A best practice to avoid this issue is to ensure all numerals used are at least two digits like so: 01, 02, 03, 04, 05... 10, 11, 12, 13, 14. Using this format, the items will always appear in the expected order. The prior example, edited to use the two digit format, now appears this way:
A best practice to avoid this issue is to ensure all numerals used are at least two digits like so: 01, 02, 03, 04, 05... 10, 11, 12, 13, 14. Using this format, the items will always appear in the expected order. The prior example, edited to use the two digit format, now appears this way:
AFFECTED SYSTEMS & USERS:
Knowledgebase content creators who make knowledgebases with numerals in the names
ADDITIONAL INFORMATION:
ESCALATION PROCEDURE:
If you require further assistance, please contact our Support team at +1 (877) 373-7848, option 2; or by email at CIMSupport@moxiesoft.com.