December 13, 2005

Sorting Schedules by Door Numbers with Suffixes

If you have set up a door number property that reads in a room number as the door number, your room numbers are all integers and you only add a suffix to the door number when you have more that one door, you may find that your schedule is sorting all of the doors with suffixes first, followed by the "whole number only" door numbers. You can get the entire list to sort together by forcing the formula to return a string value by changing the formula from:

[RoomNumber][NumberSuffix]

to

"[RoomNumber]" & "[NumberSuffix]"

That will return situations, with and without a alphabetic suffix, as strings, and they should sort together. Remember that you can not simply cut and paste property references in a formula, you need to select them from the lower pane [lower left pane in 2006].

2 comments:

BretF said...

I am having a simialr problem, but with the room schedule. Any advice here? Currently the formula is "number project based"...
Thanks in advance

David Koch said...

The NumberProjectBased formula property is set up similar to the door number property refered to in the blog article. Both use implied concatenation. For NumberProjectBased, change the formula from
[Level][Increment]
to
"[Level]" & "[Increment]"
and you may see improved sorting, as all will be treated as strings.