Re: Forms: How to let the user choose the 'order by'

From: Steve Cosner <stevec_at_zimmer.csufresno.edu>
Date: 1997/04/23
Message-ID: <5jlmig$6kh_at_info.csufresno.edu>#1/1


In article <861719061.9962_at_dejanews.com>, <aut7b1p_at_sbs.de> wrote:
>I'm wondering that I can't find a way to make it possible to let the user
>change the order-by clause.
>
>I've tried to use a control-block, but the required triggers themes to be
>somewhat difficult;
>The second, I've tried to use LOV's, but I don't know how to fill the LOV
>at runtime with the required table-column-names or view-column-names.
>Third, I tried to let the user just click on the column, but this requires
>a lot of PL/SQL-programming, too (I've found just mouse-event triggers
>that I can use, the trigger must be at form-level... isn't there a thing
>like 'on-enter-tablecolumn' ?).

Forms provides a method-- While in Enter_Query mode, type a colon (:) in any of the block's columns where a query selection value is not entered. Execute the query (Press F8). A Query/Where edit window pops up, and in this window, you can type special query clauses, and you can also enter an order by clause, for example:

      ORDER BY col5,col2,col1 desc
Then click the OK button or press F10, and the form will complete the query.

If that is too difficult for your users, then you might try setting up a control-block field where the user could enter symbols for each column, for example: 1A,5D,2A

Then in your when-validate-item trigger for that item, build the order by clause. The example would be translated to: ORDER BY COL1 ASC, COL5 DESC, COL2 ASC HTH,
Steve Cosner Received on Wed Apr 23 1997 - 00:00:00 CEST

Original text of this message