Hello:
I'm having trouble pre-populating a form with fields that are derived from two tables which will allow my users to update the information.
I have two pages. One page is a report which displays information from two tables and has an edit link for each record. The second page is a form which should have the fields pre-populated when the edit link is clicked.
The form pre-populates only one field.
Table 1 is a department table with the following fields: deptno(PK), deptname, location.
Table 2 is an employee table with the following fields: empid(PK), deptid, empname.
My report page has the following select statement to display the information from both tables:
select a.deptno,
a.deptname,
a.location,
b.deptid,
B.empid,
b.empname
from test1 a, test2 b
where a.deptno=b.deptid
In my Report Attributes tab, the Edit link is set on DEPTNO.
My form page has a process defined to fetch rows from a table. Apparently I can't seem to figure out if there is a way to fetch from multiple tables. Therefore, I’m using the department table as my table, for Item Containing Primary Key is set to P2_DEPTID, and Primary Key Column is deptno. The process point is After Header.
For simplicity, I will use only one item as an example from the Items section in Page Rendering. The item is P2_LOCATION: Under Source, I have Always Replacing…for Source Used; Database Column for Source Type, and LOCATION for Source Value.
I have no difficulty in pre-populating form fields coming all from one table. But, when I need to pre-populate a form which has two or more tables, I cannot get the data into the fields.
Is there a “trick” I’m missing to get this accomplished?
I hope someone can help me out.
Thanks.