I have a table column in which some cells contain simple words (e.g., 'web', 'production', 'engineering-employees'), and others that contain LDAP distinguished names (such as 'cn=operators,ou=Groups,dc=example,dc=com', 'cn=helpdesk,ou=Groups,dc=example,dc=com').
They're easily separable; the DNs *always* start with 'cn=' and the simple words.. don't.
I want the sorting for this column to keep each type together, but sorted within the types (with DNs considered as lexically subsequent to simple words). So an ascending sort would produce:
engineering-employees
production
web
cn=helpdesk,ou=Groups,dc=example,dc=com
cn=operators,ou=Groups,dc=example,dc=com
and a descending sort would produce:
cn=operators,ou=Groups,dc=example,dc=com
cn=helpdesk,ou=Groups,dc=example,dc=com
(I'd actually prefer that the DNs *always* came last, but that's 'way more complicated..)
How can I impose this arbitrary sort order on the column?
Thanks!