Gossamer Forum
Quote Reply
Sort
I want the records returned in my short display to be sorted alphabetically by field 1. It works fine in "List All", but not in other searches.

I put this in html_record...

<a href="$db_script_link_url&sb=1&ww=on&view_records=1&$db_key=$rec{$db_key}">

This doesn't work. Am I putting the &sb=1 in the wrong place?

I also put the following link (for "List All") in html_footer:

<A HREF="$db_script_link_url&sb=1&view_records=1&$db_key=*">

This works fine.

Is there any way I can alpha sort records in the short display?

Thanks again.

Rick
Quote Reply
Re: Sort In reply to
This link:

<a href="$db_script_link_url&sb=1&ww=on&view_records=1&$db_key=$rec{$db_key}">

if it is in html_record, will return only one record. I don't understand what the problem could be, since you can't sort one record.

------------------
JPD





Quote Reply
Re: Sort In reply to
  It happens!

If you want the results of a search to always be sorted by the same field, add the following to sub html_view_search

<input type="hidden" name="sb" value="1">

Put it after

<input type=hidden name="uid" value="$db_uid">

Do the same thing in sub html_view_failure.


------------------
JPD





Quote Reply
Re: Sort In reply to
THWACK!

(The sound you hear is my palm forcibly arriving at my forehead.) I now realize I'm trying to sort one record, and through the wrong link.

My question still remains, however. Where do I put &sb=1 in order to get an aplha sort in the short display? I'm acheiving this just fine with "list all", but I don't get an alpha sort when displaying less than all records.

Thanks again.

Rick

Quote Reply
Re: Sort In reply to
thwack thwack thwack thwack thwack thwack !!!

I'm applauding you! Your solution works perfectly.

Thank Thank Thank Thank Thank Thank You!

Rick
Quote Reply
Re: Sort In reply to
 Smile

Realize that I've been working with this script almost continuously for about a year. I wouldn't have thought of that either, except that I've got a lot of experience.


------------------
JPD