Welcome, Guest. Please Login
Tinderbox
  News:
IMPORTANT MESSAGE! This forum has now been replaced by a new forum at http://forum.eastgate.com and no further posting or member registration is allowed. The forum is still accessible via read-only access for reference purposes. If you wish to discuss content here, please use the new forum. N.B. - posting in the new forum requires a fresh registration in the new forum (sorry - member data can't be ported).
  HomeHelpSearchLogin  
 
Pages: 1
Send Topic Print
'Sort by' numbers not working (Read 11918 times)
Talal
Full Member
*
Offline



Posts: 56

'Sort by' numbers not working
Mar 10th, 2008, 12:57pm
 
I have one biographical entry who died in the year 90. All the rest died after 100. When I am sorting all the entries by the date of their death, every entry is being sorted except the first one: the one who died in the year 90; he's being put at the bottom. I tried changing the attribute to "string", and to "number" (am not using "date" due to other problems), to no avail. How does one sort things in numerical order?
Back to top
 
 
  IP Logged
Mark Bernstein
YaBB Administrator
*
Offline

designer of
Tinderbox

Posts: 2871
Eastgate Systems, Inc.
Numeric sorting is fine
Reply #1 - Mar 10th, 2008, 4:16pm
 
I just tested numeric sorting, and it's working fine in Tinderbox 4.2.

What might be causing troubles is that I'm not sure you can simply change an attribute from string to numeric and back.  In the general case, of course, you cannot: "Cat" can be a string, but not a number.  

Tinderbox WILL let you move information easily from strings to numbers and back, through agent actions and rules. So, I'd create a new numeric attribute, use a rule or action to assign the existing string numerals to new numeric attribute, and then you will likely be set.
Back to top
 
 
WWW   IP Logged
Talal
Full Member
*
Offline



Posts: 56

Re: 'Sort by' numbers not working
Reply #2 - Mar 10th, 2008, 6:40pm
 
Mark, that solved my "not working" problem. It must have been exactly what you said: switching between attribute types must have caused the problem. I used an action to move things into a new, clean numeric attribute, and all was sorted perfectly. Sorry for the confusion. Moral to be learnt for posterity's sake: if you switch attribute types, sorting might not work.  Wink
Back to top
 
 
  IP Logged
Mark Bernstein
YaBB Administrator
*
Offline

designer of
Tinderbox

Posts: 2871
Eastgate Systems, Inc.
Numeric 'Sort by' is working
Reply #3 - Mar 10th, 2008, 7:40pm
 
If you switch attribute types, sorting will work -- but perhaps only after you save and reload, and even then there's the question of whether the data can be sensibly coerced to the new type.
Back to top
 
 
WWW   IP Logged
Pages: 1
Send Topic Print