Re: Forms3.0 Order by
Date: Thu, 18 Nov 93 15:04:33 +1000
Message-ID: <AAX9mwi8N1_at_sg2.kbv>
In <CGn7G6.EAp_at_empros.com> biverson_at_empros.com (Becky Iverson) writes:
> 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
First of all, I don't work with Forms3.0 but v2.3, and therefore I don't know any special features of v3.0, nevertheless I hope it will work fine there too.
Becky, you can handle user defined dynemic ORDER BY like this:
ORDER BY DECODE(:control.flag,'N',name,'A',address,'Z',zipcode,...,code)
where :control.flag is a displayed form field in a control block which can be set by user (with some redefined KEY-... trigger), and 'name', 'address', 'zipcode', ... and 'code' are sample fields' names in sample table. Note that 'ORDER BY code' is a default ORDER BY.
Hope this helps.
-- =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= Alex Novicky | New Business Ltd. Vladivostok | voice phone (4232)266996 Russia | e-mail : oracle_at_vostok.marine.suReceived on Thu Nov 18 1993 - 06:04:33 CET