Gossamer Forum
Home : Products : DBMan : Customization :

Sorting by radio or select with specific order

Quote Reply
Sorting by radio or select with specific order
OK since my post was buried all the way the bottom of the old one I made it separate here.

I found 2 different posts by JPD, both that appear might work for what I need. But, some of the info is missing.

Her first post:

"You mentioned earlier about "sorting" but not alphabetically -- Book, Translation, Article. There's only one way I can think of to do this -- well, actually two ways. The first way would be to have another field with the sort order. Book would have a "1" in the field, Translation would have a "2" and Article would have a "3." It could pretty easily be done without your having to manually enter the values. The other way would be to stick the numbers at the beginning of the categories -- 1Book, 2Translation, 3Article. Then it would sort the way you want. You could chop off the first character when you print it out so the numbers wouldn't be seen. You could even have the stick the numbers in so you wouldn't have to do it."

Her second post:

" I understand. But the only way you can get it to sort is to "translate" your names into either numbers or other letters that will sort the way you want them to -- so that

ONLINE = 1
ANSWERED = 2
CLOSED = 3


(you could also use "a, b and c" if you wanted)

Then the script can sort by the "translation" instead of the actual word. It can still print out the word, even though the word isn't in your database.

What I want to give you is a way that the script will automatically enter the number when you select the word in either a select field or a radio field.

I suppose it would be possible to work out some other way to do it, but it would be much more complicated. "


I have members that have "rank". When search results display for a particular field name I need the results to print out in the proper order (by their rank: Duke, Count, Baron, Knight, Squire) within a single search or even if it is view all.

Which of these posts would be best? And, each have missing parts (#1 says you can "chop off the 1st character and have stick #'s, but I cannot find how to do that) and (#2 "What I want to give you is a way that the script will automatically enter the number when you select the word in either a select field or a radio field." I do not see that she ever did that part and cannot figure out what she means.

Anyones help would be greatly appreciated.

Smile









Diana Rae