Home » Developer & Programmer » Forms » Oracle Forms Master Detail detail (Oracle Forms 11g, Windows 7, Oracle Weblogic 11g)
Oracle Forms Master Detail detail [message #643615] Tue, 13 October 2015 16:00 Go to next message
lakemichigan2
Messages: 6
Registered: October 2015
Junior Member
Hello,

I'm trying to figure out how to do a master detail detail form on Oracle forms properly.
There are 3 zones in my form. I uploaded the a simple script i'm using as an example.

I created a table emp2 and a table dept2. The table Emp2 has emp_id and emp_name. The table dept2 has dept_id, dept_seq_no,col_type and emp_id as well.

In the 1st zone, I query the emp2 table. When I do, I want only the col_type record 'update' in the 2nd zone. And furthermore, I want only the col_type record 'where' for the corresponding 'update' record in the 3rd zone.

So Zone 2 and 3 are used by the same table, but are differentiated by the col_type record.

I couldn't find anything like this on google. Hope it makes sense.

Thanks
Re: Oracle Forms Master Detail detail [message #643617 is a reply to message #643615] Tue, 13 October 2015 16:20 Go to previous messageGo to next message
Littlefoot
Messages: 21807
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Quote:

The table Emp2 has emp_id and emp_name. The table dept2 has dept_id, dept_seq_no,col_type and emp_id as well.

That sounds wrong. EMP should reference DEPT, not vice versa (i.e. EMP2 should have DEPT2.DEPT_ID).

As of your question: use data block's WHERE clause property. You can set it while designing the form (if it won't change), or you can even modify it during runtime using SET_BLOCK_PROPERTY built-in (check Forms' Help for more info about it).
Re: Oracle Forms Master Detail detail [message #643620 is a reply to message #643617] Tue, 13 October 2015 16:39 Go to previous messageGo to next message
lakemichigan2
Messages: 6
Registered: October 2015
Junior Member
Alright then I will try that. And I see what you are saying about the data. I just made up the data a bit, for my issue with the separation 'update' and 'where' rows.

Thank you
Re: Oracle Forms Master Detail detail [message #643636 is a reply to message #643620] Wed, 14 October 2015 09:28 Go to previous message
CraigB
Messages: 386
Registered: August 2014
Location: Utah, USA
Senior Member
Quote:
I'm trying to figure out how to do a master detail detail form on Oracle forms properly.

The proper way to create a Master-Detail form is through the use of the Relations block properties. If configured correctly, you can have multiple Master-Detail relationships within a single form - which would give you the Master-Detail-Detail configuration you are looking for.

I agree with Littlefoot, your dependencies sound backward. With your configuration, the DEPT2 table would be the Master to the EMP2 table.

Quote:
In the 1st zone, I query the emp2 table. When I do, I want only the col_type record 'update' in the 2nd zone. And furthermore, I want only the col_type record 'where' for the corresponding 'update' record in the 3rd zone.

So Zone 2 and 3 are used by the same table, but are differentiated by the col_type record.

For this, you will need to have 2 data blocks each based on the DEPT2 table and a Relationship created between the EMP2 (Master) block and each of the DEPT2 blocks (eg: DEPT_UPDATE and DEPT_WHERE). The relationship will handle the initial linking of the blocks. Now, as Littlefoot suggests, you can set the WHERE property of each block to further filter the rows displayed; so DEPT_UPDATE's where clause would be: "COL_TYPE = 'WHERE'" and DEPT_WHERE would be: "COL_TYPE = 'WHERE'".

Craig...
Previous Topic: Annual leave of the year
Next Topic: GET_APPLICATION_PROPERTY return uppercase password
Goto Forum:
  


Current Time: Thu Apr 18 18:23:22 CDT 2024