LOV - select character value, but store numeric offset [message #140770] |
Wed, 05 October 2005 09:37 |
bdrufner
Messages: 42 Registered: August 2005 Location: Home of the Mardi Gras, N...
|
Member |
|
|
Forms 9.0.4 (10g) and RDBMS 9.2
Probably a simply question, however I am new to Forms.
For sake of this discussion, let us use a subset of the EMP and DEPT tables that ship with the Oracle distribution.
EMP columns:
Deptno NUMERIC
Name VARCHAR2
DEPT columns:
Dname VARCHAR2
Deptno NUMERIC
My data block, EMP_BLOCK consist of the two columns in the EMP table. The Deptno value is not very useful to the user and they would like to see the actual dept value in Dname in the LOV.
How can I create a LOV that allows the user to select the Dname value from DEPT table based on the stored value of EMP_BLOCK.Deptno while still storing the numeric value of Deptno in the EMP table should the user change the value in Forms?
I would like to continue to store the numeric value of Deptno in the EMP table, just show the user the Dname value in DEPT table during query / insert / modify.
Easy enough in SQL (do a join), but I am sure that some trigger must be created in Forms, but can't seem to find the correct one.
Any help/sample code/ideas are appreciated. Thanks
Barry
[Updated on: Wed, 05 October 2005 09:40] Report message to a moderator
|
|
|
|
|