Hi Christian,
Understanding the GlobalID Field: The GlobalID field is a crucial element in geodatabases, serving as a unique identifier for each record. This field ensures data integrity and is especially important for maintaining relationships between tables and synchronizing edits in distributed environments.
Why GlobalID Sorting is Limited: The primary reason sorting by GlobalID may not be as straightforward as other fields is due to its inherent role in data management. The GlobalID field typically uses a unique, system-generated identifier (UUID) for each record, which isn't designed for user-friendly sorting.
Additional Idea:
*Notes :
Sorting text that contains a mix of numbers, letters, and signs (also known as alphanumeric sorting) follows a specific sequence. This sequence is typically based on the ASCII values of the characters and is commonly referred to as "lexicographical order" or "dictionary order." Here's the general order of sorting:
Symbols: Special characters and punctuation marks (e.g., !, #, &, @).
Numbers: Digits are sorted numerically (0-9).
Uppercase Letters: Uppercase alphabetic characters (A-Z).
Lowercase Letters: Lowercase alphabetic characters (a-z).
Hi Jemoo
Thank you very much for the information! We successfully use the workaround with the text field. That works well - for sorting as for searching. Nevertheless, it would be interesting if the GlobalID field itself could also be sorted... even if it would require a little more logic in the background?
Thank you for your feedback! I'm glad to hear that the workaround with the text field is working well for sorting and searching.
As mentioned earlier, the GlobalID field is designed to be a unique identifier that is generated randomly to ensure the integrity and uniqueness of each record. While it's theoretically possible to implement more complex logic to sort GlobalIDs directly.
The GlobalID column technically sorts correctly, the issue is the byte ordering of the raw GUID data vs. the standard presentation. If I use data stored in a SQL Server EGDB it's sorted per the SQL Server uniqueidentifier type as described in this blog post, which is why it doesn't appear sorted. I couldn't tell you if every EGDB host has their own behavior or if ArcGIS in forcing everything to sort like uniqueidentifier but there is a method to the madness.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.