PDA

View Full Version : How to populate fields in Oracle Forms.


Daku
05-04-2005, 05:18 AM
Hi,
I am new to Oracle Forms so treat me as a layman. I created a form
having the following fields SID, Emp_NO, Emp_Name, Emp_problem. After
one enters the information the record is saved to a table called
emp_prob. There is another table called emp_info. What I want to do is
to have the Emp_No filed in the form as drop down and when a number is
selected in that list it should automatically populate the Emp_Name
field. Emp_NO and Emp_Name are stored in the table emp_info.
I have looked far and beyond but to no avail. Is it even possible to
do in Oracle. Please help.........

Daniel Morgan
05-04-2005, 06:54 AM
Daku wrote: Hi, I am new to Oracle Forms so treat me as a layman. I created a form having the following fields SID, Emp_NO, Emp_Name, Emp_problem. After one enters the information the record is saved to a table called emp_prob. There is another table called emp_info. What I want to do is to have the Emp_No filed in the form as drop down and when a number is selected in that list it should automatically populate the Emp_Name field. Emp_NO and Emp_Name are stored in the table emp_info. I have looked far and beyond but to no avail. Is it even possible to do in Oracle. Please help.........

It appears from what you are asking that you need to learn about
relational databases rather than Oracle Forms.

In a relational database you never populate duplicate fields in
a child table with information from the parent with the sole
exception being the foreign key that relates the records. So start
by removing the duplicate columns from the child table.

In Forms this is done by creating a relationship in the Data Block
Wizard. Create the block for the parent using the data block wizard.
Then using the wizard select the child table being sure to include
in selected fields the foreign key to the parent. Click "Next" and
you will be looking at a page the has a button labeled "Create
Relationship." Uncheck the Auto-join checkbox and then push the
"Create Relationship" button. Select the default relation type.
Select the parent table and press Ok. Under Detail Item and Master
Item select the columns that create the join. Finish creating the
child block. Forms takes care of everything else.
--
Daniel A. Morgan
University of Washington
damorgan@x.washington.edu
(replace 'x' with 'u' to respond)


MyLounge.com Site Map
Forum: Cars, Cell Phone, Database, Games, Home Improvement, IT, Music, School, Sports, Web Design, Web Server, Weight Loss

The MyLounge.com forum is intended for informational use only and should not be relied upon and is not a substitute for any advice. The information contained on MyLounge.com are opinions and suggestions of members and is not a representation of the opinions of MyLounge.com. MyLounge.com does not warrant or vouch for the accuracy, completeness or usefulness of any postings or the qualifications of any person responding. Please consult a expert or seek the services of an attorney in your area for more accuracy on your specific situation. Please note that our forums also serve as mirrors to Usenet newsgroups. Many posts you see on our forums are made by newsgroup users who may not be members of MyLounge.com Term of Service