Re: Forms3.0 Order by

From: <ditommm_at_aa.wl.com>
Date: Wed, 17 Nov 93 13:51:38 PST
Message-ID: <2cds99$fip_at_reeve.research.aa.wl.com>


In article <CGn7G6.EAp_at_empros.com>, <biverson_at_empros.com> writes:
> Newsgroups: comp.databases.oracle
> Path:

reeve.research.aa.wl.com!envoy.wl.com!decwrl!decwrl!concert!news-feed-1.peachne t.edu!news-feed-2.peachnet.edu!umn.edu!uum1!fs!nntp_server!empros.com!biverson
> From: biverson_at_empros.com (Becky Iverson)
> Subject: Forms3.0 Order by
> Sender: news_at_empros.com (ems-news)
> Message-ID: <CGn7G6.EAp_at_empros.com>
> Date: Wed, 17 Nov 1993 15:38:30 GMT
> Reply-To: biverson_at_empros.com
> Nntp-Posting-Host: minnie.empros.com
> Organization: Empros Power Systems Control, a Division of Siemens E&A
> Lines: 14
>
> I have been looking for ways to create a dynamic order by statement
> in a block in forms and so far have had no luck. I have tried
> substitution variables, and global variables. Does anyone know of
> a way to allow the user to select which field or a combination of fields
> to order by without expecting the user to know how to construct
> an order by statement?
>
> Any help or ideas will be greatly appreciated.
>
> Thanks,
>
> Becky Iverson
> biverson_at_empros.com
>
This topic is addressed in the ORACLE Advanced SQL*Forms Techniques book under Performing Dynamic Sorting. The basic idea is to create a pre-query trigger than constructs the 'order by' statement from fields that the user has filled in on the screen. The trigger places that string:

'#=REPID order by ('||:control.sortorder

 into a field (called REPID in the example).

Hope this helps.

Matteo diTommaso
ditommm_at_aa.wl.com Received on Wed Nov 17 1993 - 22:51:38 CET

Original text of this message