Re: FORMS Master/Detail BLocks

From: Todd Owers <ToddO_at_gcr1.com>
Date: 1998/02/20
Message-ID: <01bd3e0a$fe3c4640$764c1bcc_at_toddo.gcr1.com>#1/1


Ed,

You can create a master-detail relationship between blocks A and C, despite the absence of a foreign key relationship. In the dialog box, type Block A in the master block field, and specify :block_A.remark_id = :block_C.comment_id as the join condition. As long as the two items exist in their respective blocks, you can create the relation, even in the absence of a primary key-foreign key relationship.

Todd Owers

Ed Jennings <jenningse_at_mindspring.com> wrote in article <34ECD65D.412C_at_mindspring.com>...
> I have a schema with the following tables (among others).
>
> TABLE A
> PHONE Number Primary Key
> ...
> REMARK_ID Number Foreign Key to TABLE C (COMMENT_ID)
>
> TABLE B
> TRANSAC_NUM Number Primary Key
> ...
> NOTES_ID Number Foreign Key to TABLE C (COMMENT_ID)
>
> TABLE C
> COMMENT_ID Number Primary Key
> COMMENTS LONG
>
> As you can see, all of the free-form text for all of the tables is
> stored in a single table (joined with numeric id's) that isolates
> the highly volatile data elements from the rest of the data. For
> my application, I am only interested in TABLEs A & C. I have
> created a block for TABLE A, and I am attempting to create a block
> for TABLE C, specifying BLOCK A as the master block. Unfortunately,
> since there is not a foreign key from TABLE C back to TABLE A, FORMS
> won't provide any master block choices. I can't add a foreign key
> since TABLE C contains data joined to TABLE B also.
>
> I could probably change the schema to create many tables similiar
> to TABLE C, and therefore have the rows in each TABLE C 'clone'
> all be owned by a single master table. This would be a pain since
> I would need 12 of them, and most would contain only a few hundred
> rows.
>
> Is there another option? Perhaps some way to link the blocks via
> triggers?
> This particular block is one that will be used for insert & updates, so
> I
> opted against a view. Any suggestions???????
>
>
> TIA
> Ed Jennings
>
> --
> ~~~~~~~~~~~~~~~~~~~~~~~~~
> jenningse_at_mindspring.com
>
> "The opinions expressed here are my own, not those of DOMAIN
> technologies"
>
>
Received on Fri Feb 20 1998 - 00:00:00 CET

Original text of this message