Gossamer Forum
Home : Products : DBMan : Customization :

sorting radio fields contd.

Quote Reply
sorting radio fields contd.
I've reconsidered the problem I posted earlier on, about sorting radio fields. Note that I'm not at all good at perl, so apologies if some of my problems are all too primitive.

What I want to do: A bibliography database should, for each entry, contain the information whether it is an article or a book. So I have devised a field "category", as a radio field with the options "article" and "book".
When a user searches the database by the field "name", search results should be printed as follows:
"These are the publications by "name"
Articles:
(Here follows a list of individual articles, sorted ascending by field "year")
Books:
(Here follows a list of individual books, also sorted ascending by field "year")"

Problems/Questions:
- How do I add code that makes dbman check on whether the search results contain entries where "$rec{'category'} eq "article"", and if so, print the heading "Articles:", and do so only ONCE? If I add something like "if ($rec{'category'} eq "article") {print qq|Articles:|;}", then I get the heading for EACH article result individually, but not for the entire section of articles. I guess the "for (0 .. $numhits - 1) {&html_record (&array_to_hash($_, @hits));}" in sub html_view_success is responsible for this, but don't know what to change.

- If "sort ascending by field "year"" is specified in the search-form, will dbman then sort ALL results by year (which I fear will be the case), and do I have to use the multiple sort mod in order to have it sort first by category, then by year? Plus: If I let dbman sort by category, where the values can be "article", "book" and "translation", is there a way to specify a sorting sequence which is neither ascending nor descending, like "book" > "translation" > "article"?

as usual - many thanks in advance,



kellner
Subject Author Views Date
Thread sorting radio fields contd. kellner 7220 Jul 21, 2000, 9:16 AM
Thread Re: sorting radio fields contd.
LoisC 7113 Jul 21, 2000, 10:05 AM
Thread Re: sorting radio fields contd.
kellner 7070 Jul 23, 2000, 12:59 PM
Thread Re: sorting radio fields contd.
JPDeni 7047 Jul 25, 2000, 12:08 AM
Thread Re: sorting radio fields contd.
kellner 7042 Jul 26, 2000, 4:39 AM
Thread Re: sorting radio fields contd.
JPDeni 7036 Jul 26, 2000, 4:08 PM
Thread Re: sorting radio fields contd.
kellner 7033 Jul 26, 2000, 5:38 PM
Thread Re: sorting radio fields contd.
JPDeni 7020 Jul 26, 2000, 6:03 PM
Thread Re: sorting radio fields contd.
kellner 7035 Jul 27, 2000, 8:09 AM
Thread Re: sorting radio fields contd.
JPDeni 7055 Jul 27, 2000, 4:18 PM
Thread Re: sorting radio fields contd.
kellner 7014 Jul 27, 2000, 5:16 PM
Thread Re: sorting radio fields contd.
JPDeni 7012 Jul 27, 2000, 5:24 PM
Thread Re: sorting radio fields contd.
kellner 7029 Jul 28, 2000, 7:04 AM
Thread Re: sorting radio fields contd.
JPDeni 7012 Jul 28, 2000, 7:32 AM
Thread Re: sorting radio fields contd.
kellner 7004 Jul 28, 2000, 9:16 AM
Thread Re: sorting radio fields contd.
JPDeni 7037 Jul 28, 2000, 4:41 PM
Thread Re: sorting radio fields contd.
kellner 6990 Jul 29, 2000, 5:16 AM
Thread Re: sorting radio fields contd.
JPDeni 7023 Jul 29, 2000, 6:05 AM
Thread Re: sorting radio fields contd.
kellner 7011 Jul 29, 2000, 4:23 PM
Post Re: sorting radio fields contd.
JPDeni 6974 Jul 31, 2000, 2:01 AM
Thread Re: [JPDeni] sorting radio fields contd.
dianarae 6938 Jan 7, 2002, 1:15 PM
Thread Re: [dianarae] sorting radio fields contd.
dianarae 6932 Jan 7, 2002, 3:03 PM
Thread Re: [dianarae] sorting radio fields contd.
kellner 7021 Jan 7, 2002, 3:54 PM
Thread Re: [kellner] sorting radio fields contd.
dianarae 6998 Jan 7, 2002, 4:21 PM
Thread Re: [dianarae] sorting radio fields contd.
kellner 7016 Jan 8, 2002, 2:30 AM
Thread Re: [kellner] sorting radio fields contd.
dianarae 1567 Jan 8, 2002, 7:23 AM
Thread Re: [dianarae] sorting radio fields contd.
kellner 1539 Jan 8, 2002, 8:10 AM
Thread Re: [kellner] sorting radio fields contd.
dianarae 1600 Jan 8, 2002, 1:17 PM
Post Re: [dianarae] sorting radio fields contd.
kellner 1590 Jan 8, 2002, 2:27 PM