Sorting Boolean Fields Appears to Be Incorrect.
  
PSS ID Number: Q127174
Article last modified on 03-21-1995
 
3.00 3.00a 4.00 | 3.00 4.00
 
WINDOWS         | MACINTOSH
 

--------------------------------------------------------------------
The information in this article applies to:
 
 - Microsoft Project for Windows, versions 1.0, 3.0, 3.0a, and 4.0
 - Microsoft Project for Macintosh, version 1.1, 3.0 and 4.0
--------------------------------------------------------------------
 
SYMPTOMS
========
 
In Microsoft Project, when you sort some of the fields that contain text,
the fields appear to be sorted incorrectly. For example, when you sort the
entries in the Flag field (which contains the entry "yes" or "no"), if the
data is sorted in ascending order, "yes" appears in the sorted data before
"no."
 
CAUSE
=====
 
This behavior occurs because some fields that contain text entries are
Boolean fields, not text fields. In a Boolean field, a numeric value is
associated with the text entry. In the Flag field, "yes" equals -1, and
"no" equals 0 (zero). Because -1 is less than 0, the sort places the "yes"
value before the "no" value (this order is different from the order you
might expect if the values were sorted alphabetically).
 
STATUS
======
 
The way these values are sorted is by design of Microsoft Project.
 
KBCategory: kbusage
KBSubcategory:
 
Additional reference words: 3.00 3.00a 4.00 wrong descending
 
=============================================================================
Copyright Microsoft Corporation 1995.
