Re: developer 2000 master detail relationship

From: DanHW <danhw_at_aol.com>
Date: 20 Apr 2000 02:12:37 GMT
Message-ID: <20000419221237.17642.00002372_at_ng-fo1.aol.com>


>I have a form that has a master and detail block…
>Master block (tabular form) is based on a table that has a primary key
>which is coming from a “sequence” and a “before insert database
>trigger”.
>Detail block (tabular form) is based on a table that has the primary
>key of the above block as its foreign key.
>When ever I add a record in the master block and save it, that’s when
>the primary key gets added to the record (right before the insertion to
>the database). But at this point the value doesn’t show in the actual
>field on the form. If I hit f7 and f8 then It shows up.
>
>The problem is that the detail block foreign key has “copy value from
>item property” filled with master_block.primary_key. So, the moment
>for which that field is empty, the value doesn’t get filled.
>Is there a way out of this problem. So that, users don’t have to hit f7
>and f8 to start adding values to the detail block.
>
>Thanks..
>

If you don't mind your sequence numbers going fast, you can set the default value of the PK in the master to the generating sequence. If you don't like that, you will have to determine/generate the new PK on a trigger in the newly created (but unsaved) row, probably on the key-crerec trigger.

HTH
Dan Hekimian-Williams Received on Thu Apr 20 2000 - 04:12:37 CEST

Original text of this message