Duplicating master-detail record set in Forms - ?
From: dnh <nogood_at_using.this.addr.com>
Date: Sat, 7 Aug 2004 15:18:27 +0100
Message-ID: <41148244$1_at_cpns1.saic.com>
Hi
Date: Sat, 7 Aug 2004 15:18:27 +0100
Message-ID: <41148244$1_at_cpns1.saic.com>
Hi
I'm adding a duplicate function to one of my forms which is basically a master-detail with 3 detail blocks. Basically it saves the users having to type in the whole set of data again if they're only changng one or 2 items.
The way I can think of doing it at the moment is:
- store pk (actually a surrogate id) of original master record.
- use duplicate-record forms built in on the master block, then change the pk (id) to a new one.
- use pl/sql to recreate the detail records from the original, using the id stored in step 1.
- requery detail blocks to pick up data created in step 3.
- ta-da, job done
Another option would be to replace steps 3 & 4 with some forms processing which gets the original detail data via a cursor and adds it to the forms blocks with create-record etc.
Any opinions (as if I have to ask) on the better of the 2 methods above.
Or, alternatively and probably more interesting to me, does anyone have a better way of doing it?
looking forward to your answers
cheers
nigel
-- ----- to reply, remove cavemen from below: fred.nillspam.barney_at_yahoo.comReceived on Sat Aug 07 2004 - 16:18:27 CEST