Re: Question - Forms 4.5 Calculated Fields

From: Urs <Urs.Fasler_at_ezv.admin.ch>
Date: 1998/02/20
Message-ID: <34ED33A8.152F_at_ezv.admin.ch>#1/1


DanHW wrote:
>
> >Greetings Group -
> >
> >I'm new at Forms, and having a few problems. The main one is I have a
> >master/detail screen, and I want to add up a column in the detail
> >section. I'm at a total loss on how to do this, but I'm sure it's
> >simple. Can someone assist?
> >
> >TIA,
> >Troy
> >
> One way is to use a Post-query trigger (on the detail), computing the value(s)
> you want to display. However, the post-query trigger will only fire for the
> rows it retrieves - which is based on how many you display. If your detail
> block shows 5 rows, but there are are 30, the post-query on the detail will
> only know about the 5 rows it retrieved. Another approach would be to put a
> straight SQL-query in the post-query trigger on the master that computed the
> values you want.
>
> Hope that gets yoyu started.
>
> Dan

To calculate all Rows, add in the on-populate-detail trigger the following:
go_block('detail');
last_record;
first_record;
go_block('master');

Greetings from Switzerland Received on Fri Feb 20 1998 - 00:00:00 CET

Original text of this message