I logged this as a feature request when With bought Tango. For a while you could get around this limitation by specifying multiple sort columns and directions for the custom column. For example:
<@assign request$sort "col1 asc, col2 desc, col3">
Notice that col3 didn't have a sort direction. That's because the direction specified in the search action was applied to the last column.
This provided sufficient flexibility to control both the sort direction dynamically and the number of sort columns. I was a pretty happy camper, though I still wanted to be able to specify sort directions dynamically.
However, an "improvement" was made to how sql was generated and the ability to specify multiple sort columns and directions were lost (I'm sure that it did improve other things). Now, we're stuck not having that workaround AND not being able to dynamically specify sort directions. I'm very frustrated with this.
Stefan
At 01:36 AM 10/21/2004, you wrote:
the custom column will only allow you to specify the column - unfortunately it will not allow you to dynamically specify the direction (asc/desc).
I logged this as a feature request a few months back - I wanted to have a form whereby the user could select how they wanted the columns to be ordered by but also the direction the order would be in. In the end I used a direct DBMS...
--- Jonah Simpson <[EMAIL PROTECTED]> wrote:
> Indeedly do. > > From what I understand that would the code that gets > inserted in the > sort by portion. > > ie. Select * from blah_db.blah_table order by > table.column @@ > request$sort_order. > > I could be wrong though, I haven't used it for > awhile. You might want > to experiment by putting variables in and then right > clicking on the > query and choosing sql query to see what kind of > query it actually > generates. > > Good luck, > Jonah > > On Wed, 20 Oct 2004 22:21:09 -0700, Roland Dumas > <[EMAIL PROTECTED]> wrote: > > > > Yes, I see that. So what do I put in that free > form box, something like > > 'table.column ASC' or 'table.column > @@request$sort_order'? > > > > On 10/20/04 10:14 PM, "Jonah Simpson" > <[EMAIL PROTECTED]> wrote: > > > > > Hey Roland, > > > > > > I don't know if you're using Windows or OS X, > but if you right click > > > in the sort order window of a search action, you > can choose custom > > > criteria or something of that nature, which will > give you the ability > > > to input a variable to choose the sort order. > > > > > > Hope this helps. > > > > > > Cheers, > > > Jonah Simpson > > > > > > > > > On Wed, 20 Oct 2004 22:03:50 -0700, Roland Dumas > <[EMAIL PROTECTED]> wrote: > > >> In a search action, one sets the sort fields > and the ASC DESC sort orders. > > >> > > >> Is there any way to control the sort order (ASC > DESC) by a variable? > > >> > > >> One can always sort the resultset, but that's > only sorting the piece of the > > >> totalrows > > >> > > ----------------------------------------- > > Roland Dumas > > Roberts Information Services > > 310 W. Bellevue Avenue > > San Mateo CA 94402 > > 650-347-1373 > > 415-412-9300 (cell) > > [EMAIL PROTECTED] > > SMS: http://new.servqual.com/html/sms.tml > > > > > ________________________________________________________________________ > > > > > > TO UNSUBSCRIBE: Go to > http://www.witango.com/developer/maillist.taf > > > ________________________________________________________________________ > TO UNSUBSCRIBE: Go to > http://www.witango.com/developer/maillist.taf >
_______________________________ Do you Yahoo!? Declare Yourself - Register online to vote today! http://vote.yahoo.com ________________________________________________________________________ TO UNSUBSCRIBE: Go to http://www.witango.com/developer/maillist.taf
=====================================================
Database WebWorks: Dynamic web sites through database integration
http://www.DatabaseWebWorks.com
________________________________________________________________________ TO UNSUBSCRIBE: Go to http://www.witango.com/developer/maillist.taf
