cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

FOSI Index sorting: content and sortas values sort differently

naglists
1-Newbie

FOSI Index sorting: content and sortas values sort differently

Hi all,
I've got a field index based on the Help 70 parts index. The first value I'm
indexing is numeric (a field number). Using just the value of the number
element, I get the following sort:
12 Twelve
44 Forty-four
5 Five

What I want, of course, is:
5 Five
12 Twelve
44 Forty-four

I've coded up the sortas attribute and have included it as a key. If I set
sortas="05", I now get the following sort:
12 Twelve
5 Five
44 Forty-four

If I change the field number itself to 05, I get what I want, sort-wise, but
not presentation-wise:
05 Five
12 Twelve
44 Forty-four

Any ideas about what's going on?

--
Paul Nagai
2 REPLIES 2

Hey, Paul,
Did a bit of 'index' writing last year. Try using a three-digit sortas
value for all three (i.e. "005", "012", "044"). I believe that will fix
your problem. Definitely want to hear from you if not.

Regards,
Steve Thompson
(316)977-0515
When the only tool you have is a hammer,
Everything looks like a hard disk...

Ok, this is even more weird. That yielded the "original" sort:
12 Twelve
44 Forty-four
5 Five

Aha. My savetext on the sortas was bad. I was always saving a null value
which did affect the sort, just unpredictably. I'm not sure why null is > 12
but < 44 but now that I'm getting the output and sort I need, I'm done
thinking about this one ... except to say, thanks, Steve, your tip pushed me
to suspect my code, not theirs 😉

Anyhow, now just setting 5's sortas to 05 does work. Triple digits not
required (although they do work, now that my savetext is fixed).

Announcements