Path: utzoo!attcan!uunet!fernwood!oracle!news From: kbittner@oracle.uucp (Kurt Bittner) Newsgroups: comp.databases Subject: Re: SQL*Forms V3.0 -- Multiple detail relations? Message-ID: <1990Oct18.152751.11893@oracle.com> Date: 18 Oct 90 15:27:51 GMT References: Reply-To: kbittner@oracle.UUCP (Kurt Bittner) Distribution: comp.databases Organization: Oracle Corporation, Belmont, CA Lines: 31 In article drack@titan.tsd.arlut.utexas.edu (Dave Rackley) writes: > > [stuff deleted] > >The questions: Is SQL*Forms v3.0 limited to one master, one detail relation; > if not, what is the secret incantation (trigger) that allows > retrieval and display of the forms data? > The easy way to do this is to: 1) Use the CONSTRAINT capability provided in the Oracle RDBMS to define the primary key/foreign key relationships when you create the tables. It is also a good idea to code CHECK constraints into the table definitions since Forms 3 can use these to automatically generate validation triggers if you select "Use Constraints" on the default block screen. 2) Use the Block Default option to define your blocks. When you define the "detail" block, indicate that the "master" block is the master block. If you press "List of Values" while in the "master block" field, you'll get a pop-up menu of all valid master block choices based on blocks already defined having a foreign key reference in your current table. Selecting the master block will define the relationship automatically. 3) Generate the form. That's it. (Of course you can always do all the work manually; if you want to see what needs to get done, look at all the triggers forms generated for the default block.) Kurt Bittner "My opinions are, humbly, my own and are not likely to Consultant be shared by anyone, let alone my company." Oracle Corporation