greetings to all,
i really need some assistance with creating a list of values for a oracle form. i need to find out this. lets say u have a form used to insert employee details and u create a list of values for employee number. when populating the form, is it possible to fill in other information like employee name and title by selecting just the employee number from the list of values? any assistance or advice i could get would be appreciated.
thanks in advance
One is to select all information within the Record Group's query (LoV is based on that record group). I guess that it makes sense to display those values in LoV (because, users love to see names, addresses etc. and not only employee's numbers). Something like this:
select empno, ename, address, tel_num
In LoV, map all those values to block items. It doesn't matter if some of them are not database items.
There's also an option to select and map certain values to block items, but not display them (as those information aren't interesting to users). In that case, set those LoV item's size to 0 (zero).
Another way to populate block items based on employee number fetched from a LoV is in the WHEN-VALIDATE-ITEM trigger on employee number item. Simply
select ename, address, tel_num
into :blk.ename, :blk.address, :blk.tel_num
where ename = :blk.ename
The same query should then be used in a POST-QUERY block trigger for all non-database items that are to be populated when users query the database (pressing the <Execute query> key).
wow..thanks alot..i got it to work using the first method..u rule man!!
i have another question though..consider a situation where i have a table called Subject with two records example Dance and Drama. when either of these records are chosen is it possible to have a field in another table called Faculity automatically changed to Performing Arts? i hope you understand what i am trying to achieve. am not sure if the second method u proposed is a solution..plz advise..thanks in advance