Re: Forms4.5 Question

From: Sky King <forsytkc_at_pid.com>
Date: 1995/08/07
Message-ID: <405rtj$ncs_at_mail.one.net>#1/1


In article <403f0f$8ln_at_mars.ftech.co.uk>, robert_at_bytesize.ftech.co.uk says...
>
>I would use record groups and a non base table block
>Put ON-SELECT, ON-FETCH triggers on the block and populate
>the block through the record group.
>When all that is in place, then all you need to do is assign
>the SQL (any SQL) to the record group programatically at run-time.
>
>Robert
>

The above idea looks like a good bet if you need to alternate between multiple tables. One other method that I've used is to place a UNION and an additional query in the PRE-QUERY trigger and include in the WHERE clause for each, a field used as a toggle so that all records fail in either the true base table SELECT or in the SELECT after the UNION.

PRE-QUERY:   :blk.fld := '#=fld AND :b.toggle=1 UNION SELECT x,y,z FROM table2

                 WHERE :b.toggle=0';

Your fields much match up between the base table select and the select after the UNION.

Hope it helps...good luck.

Kent Received on Mon Aug 07 1995 - 00:00:00 CEST

Original text of this message