User defined fields in Tasks

  • Thread starter Thread starter Ron
  • Start date Start date
R

Ron

I would like to add a field in one of my Task folders. That field
would indicate an part's location on one of many inventory shelves in
the storage building. Each row of shelves is labeled with a letter or
number. For example, we have: Rows 1-16 and rows A through J. The
rows A through J are the first rows as you enter the building. Then
rows 1 through 16 follow the row J. So row A is the first row in the
building and row 16 is the last row in the building.

I have added a field in my Task folder that indicates the row ID, but
Outlook only seems to let me format the row ID field as text. That
seems to be a problem.

When the field is formatted as text then the sorting function the Task
Manager gets messed up. After sorting the rows 10-16 come before rows
2-9.


Can anyone suggest a way that I can create fields in Tasks to sort the
fields correctly?

(I can not the row ID labeling system that is used in the building)



thanks,

Ron
 
Ron said:
I would like to add a field in one of my Task folders. That field
would indicate an part's location on one of many inventory shelves in
the storage building. Each row of shelves is labeled with a letter or
number. For example, we have: Rows 1-16 and rows A through J. The
rows A through J are the first rows as you enter the building. Then
rows 1 through 16 follow the row J. So row A is the first row in the
building and row 16 is the last row in the building.

I have added a field in my Task folder that indicates the row ID, but
Outlook only seems to let me format the row ID field as text. That
seems to be a problem.

When the field is formatted as text then the sorting function the Task
Manager gets messed up. After sorting the rows 10-16 come before rows
2-9.


Can anyone suggest a way that I can create fields in Tasks to sort the
fields correctly?

You need to zero-pad the numeric values to a uniform width, and space-pad
the non-numeric values. Since the largest value you use is two digits wide.
Something like this should work:

If IsNumeric(Row) Then
UserProp.value = Right("0" & Row, 2)
Else
UserProp.value = " " & Row
End If

Space-padding the single digit numeric values doesn't work because ASCII
values of characters 0-9 are lower than that of A, so they come first in an
alpha sort, however, the space character's value is lower than all of them.
So, values derived as shown above, will sort A-J followed by 01-16.


-Mark
 
Back
Top