Re: Oracle Portal Master Detail forms

From: DA Morgan <damorgan_at_exesolutions.com>
Date: Tue, 14 Jan 2003 15:17:10 -0800
Message-ID: <3E249A76.C66464E3_at_exesolutions.com>


Brant Oliphant wrote:

> Does anyone have documents that could help me create
> master detail forms. I'm creating a software tracking program for our
> organization. I have an order, item and vender tables.
> I created a master detail for were I can enter orders. In the master
> the Order number (primary key) is created by a sequence. In the detail
> view I would like to create the primary key Item number using an
> sequence also but the same Item number is produced for all five items.
> Do you know how to produce the correct Item Number? Also after the
> first entry my order number (primary key) and order number (foreign key)
>
> get out of sequence.
>
> Thanks for the help,
> Brant
>
> I attached the form, my be it will clear things up.
>
> Below is the text file to create tables:
>
> CREATE TABLE MANUFACTURE(
> MAN_ID NUMBER(5) NOT NULL,
> NAME VARCHAR2(50),
> WebSite VARCHAR2(50),
> Sales_Phone VARCHAR2(20),
> Sales_Email VARCHAR2(50),
> Tec_Phone VARCHAR2(20),
> Tec_Email VARCHAR2(50),
> Address VARCHAR2(50),
> City VARCHAR2(20),
> State VARCHAR2(20),
> Zip VARCHAR2(10),
> Notes VARCHAR2(512),
> CONSTRAINT MAN_PK PRIMARY KEY (Man_ID));
>
> CREATE SEQUENCE MAN_ID
> INCREMENT BY 1
> START WITH 30000
> NOCACHE;
>
> CREATE TABLE VENDER (
> VENDER_ID NUMBER(5) NOT NULL,
> NAME VARCHAR2(50),
> WebSite VARCHAR2(50),
> Sales_Phone VARCHAR2(20),
> Sales_Email VARCHAR2(50),
> Tec_Phone VARCHAR2(20),
> Tec_Email VARCHAR2(50),
> Address VARCHAR2(50),
> City VARCHAR2(20),
> State VARCHAR2(2),
> Zip VARCHAR2(10),
> Notes VARCHAR2(512),
> CONSTRAINT VENDER_PK PRIMARY KEY (VENDER_ID));
>
> CREATE SEQUENCE VENDER_ID
> INCREMENT BY 1
> START WITH 40000
> NOCACHE;
>
> CREATE TABLE SOFTORDER (
> Order_ID NUMBER(5) NOT NULL,
> ODate Date,
> Invoice VARCHAR2(25),
> Payment_Method VARCHAR2(20),
> Notes VARCHAR2(512),
> Vender_ID NUMBER(5),
> ManIsVen_ID NUMBER(5),
> CONSTRAINT ORDER_FK FOREIGN KEY (Vender_ID) REFERENCES VENDER
> (VENDER_ID),
> CONSTRAINT ManIsVen_FK FOREIGN KEY (ManIsVen_ID) REFERENCES MANUFACTURE
> (MAN_ID),
> CONSTRAINT ORDER_PK PRIMARY KEY (Order_ID));
>
> CREATE SEQUENCE Order_ID
> INCREMENT BY 2
> START WITH 1
> NOCACHE;
>
> CREATE TABLE SoftItem (
> Item_ID NUMBER(5) NOT NULL,
> IName VARCHAR2(50),
> Lic_Name VARCHAR2(50),
> Price NUMBER(9,2),
> Quantity NUMBER(4,0),
> Serial_Num VARCHAR2(50),
> Expire_Date Date,
> Lincense_Key VARCHAR2(512),
> Notes VARCHAR2(512),
> Man_ID NUMBER(5) NOT NULL,
> Order_ID NUMBER(5) NOT NULL,
> CONSTRAINT Man_Item_FK FOREIGN KEY (Man_ID) REFERENCES
> MANUFACTURE(Man_ID),
> CONSTRAINT Order_Item_FK FOREIGN KEY (Order_ID) REFERENCES SOFTORDER
> (Order_ID),
> CONSTRAINT Item_PK PRIMARY KEY (Item_ID));
>
> CREATE SEQUENCE Item_ID
> INCREMENT BY 2
> START WITH 2
> NOCACHE;
Create the master block

Then use the wizard to create the child block. If you read the options presented to you by the wizard you will find that it only takes a few mouse clicks.

I do not recommend doing it manually.

Daniel Morgan Received on Wed Jan 15 2003 - 00:17:10 CET

Original text of this message