multiple block operations

From: George <synthesys_at_mindspring.com>
Date: Sat, 12 Oct 2002 22:20:20 GMT
Message-ID: <3da89a1c.669171227_at_news.mindspring.com>



I am working on a form that has a single 'parent' record, using relation objects to join with a 'child' record (actually two different joins to the same table), with each of those detail records linking up separately (via code in on-populate-details) with an yet another table (this is done by creating a query string in pl/sql and putting it in the block WHERE clause. Updates within each level/table are allowed, and but only entire configurations/combinations of these may be added or deleted.

When the user adds a record combination, first I need to prompt for the user to fill in fields in the 'parent' record (most of which have lovs), then fill in and select data to fill in the various detail records. Is there a graceful way of doing this?

I have tried the when-new-record-instance trigger just like the book says, but that trigger fires during forms startup and various other times unrelated to record creation. If it fires with record status of NEW then it fires as soon as the user enters the form. If I look for a status of QUERY then it fires right after I execute the query. If I look for a status of INSERT (which would seem to make sense) it never fires, even after I push create-record.

Apparently I will need to divide this code (prompting for values in other blocks etc) among several triggers, probably checking for record status along the way. Also I need to coordinate it so it all gets committed at once, and rolled back if any problems arise.

Can someone please give me some pointers as to how best to proceed?

Thanks much.

George Received on Sun Oct 13 2002 - 00:20:20 CEST

Original text of this message