Microsoft KB Archive/127174

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

= 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.