SQLFORMS 3 TOTAL FIELDS
Date: 5 May 93 11:15:00 GMT
Message-ID: <1608.493.uupcb_at_almac.co.uk>
Hi,
I'm currently designing forms using sqlforms version 3. One of my objectives is to write the form's code so that they will operate in both a block and character mode environment.
One of the forms represents a master detail detail relationship. The form is designed such that records in both detail blocks correspond to one record in the master block, ie;
<------ Master Block -------->
field 1 :
field 2 :
total field 1: 100
total field 2: 80
<------------- Detail Block 1 ------------>
field 1 field 2 field 3
. 50
. 50
<------------- Detail Block 2 ------------>
field 1 field 2 field 3
. 40
. 40
Total field 1 and 2 from the master block represents the sum of field 3 for all related records in each respective detail block. These total fields are, and need to be, base table fields.
In a character mode environment maintaining the master total fields as the detail records change is relatively straight forward. I use pre and post field triggers to detect changes in field 3 of the detail blocks and apply these changes to the appropriate master total field. So if the user changes a field 3 value from 50 to 25, the total field is also decremented by 25.
My problem is performing a similar function at a higher level ie when the validation unit is block or even form. The advanced forms techniques manual only illustrates methods of handling total fields using non-base table fields and post-query triggers. Could any body point me in the right direction as to how to approach this problem?
Any help appreciated
Thanks
simon.rear_at_almac.co.uk
---
. SPEED 1.20 [NR] . What follows two days of rain in Scotland? Monday..
Received on Wed May 05 1993 - 13:15:00 CEST
