Views:
Behavior:
The customer has recently upgraded from DocuWare 6.12 to 7.7. Before the upgrade, the customer could sort by modified date in a Document Tray. This allowed them to unstaple a document and keep the pages in order. In DocuWare 7.7, unstapling documents no longer keeps the pages in order. What does DocuWare use to sort documents in Document Trays?

Solution: 
After investigating the database tables, DocuWare 7.7 stops the time logging at the second interval. In contrast, the time logging stops at the millisecond interval in DocuWare 6.12.  
This difference in time logging allows documents in DocuWare 6.12 to be sorted by the modified date even when documents were unstapled in the same second.

Example of difference in Time Logging:
DocuWare 6.12 Timestamp=  2023-02-15 07:40.25:830

DocuWare 7.7 Timestamp= 2023-02-17 00:43:25.0000000

DocuWare Sorting in Document Trays:
DocuWare uses natural sort order for document trays (
https://en.wikipedia.org/wiki/Natural_sort_order). To achieve this, we use the system columns DWGROUPKEY and DWGROUPINDEX internally.

Sorting by Created On will sort documents based on their DWSTOREDATETIME value. In the case of unstapled documents, the DWSTOREDATETIME field is the same for each document created by the unstaple action. So, the “Created On” sort order of documents created by an unstaple action will be the same if you sort by “Created On” in ascending or descending order.

Sorting by Modified On will sort documents based on their DWMODDATETIME value. For unstapled documents, the DWMODDATETIME is the same for each document created by the unstaple action. So, the “Modified On” sort order of documents created by an unstaple action will be the same if you sort by “Modified On” in ascending or descending order.

Sorting by Name will sort documents alphabetically by their “Name” value.

When you click “Reset Sorting,” DocuWare will sort the documents in their natural order (https://en.wikipedia.org/wiki/Natural_sort_order) using the DWGROUPKEY first and then DWGROUPINDEX. If DWGROUPKEY is the same for several documents (which is the case for unstapled documents), DWGROUPINDEX will be used to sort them. For each document created from an unstaple action, their DWGROUPINDEX value is a unique number. For example, if you unstaple one document with ten pages, ten separate documents are created. Each document will be kept in its original order before it was unstapled, and the DWGROUPINDEX for each document will be assigned a number from zero to [total page count minus 1].

We recommend that the customer ensures that they click on “Reset Sorting” before or after unstapling a document to keep it in its original order. Additionally, when a document is unstapled, a number is appended to its original name, which also indicates what the original order of the documents was

Changes with Nanosecond Accuracy in DocuWare (7+):
Database fields DWMODDATETIME, DWSTOREDATETIME, and DWLASTACCESSDATETIME can no longer utilize nanosecond accuracy starting in DocuWare 7.0 because it is not supported in specific databases (MySQL). Upon further testing, nanosecond accuracy caused issues when system columns were used internally.

KBA is applicable to both Cloud & On-Premise Organizations.