Call one LOV from another LOV for same field [message #167783] |
Mon, 17 April 2006 01:50 |
Shumyla
Messages: 16 Registered: March 2006
|
Junior Member |
|
|
I need to call 2 LOVs for the same field, when user selet one value from first LOV then based on this value another LOV should be called for the same field. I try to use KEY in where clause but it is not working
Regards
Shumyla Aziz
|
|
|
Re: Call one LOV from another LOV for same field [message #167822 is a reply to message #167783] |
Mon, 17 April 2006 05:41 |
RAS_SANKAR
Messages: 42 Registered: March 2006 Location: India
|
Member |
|
|
try this one. it may be useful to you.
DECLARE
b1 boolean;
b2 boolean;
lov_id LOV;
rg_name VARCHAR2(40) := 'empgr';
rg_id RecordGroup;
errcode NUMBER;
BEGIN
b1 := show_lov('lov1');
rg_id := Find_Group(rg_name);
rg_id := Create_Group_From_Query( rg_name,'select distinct deptno from emp where job=:t');
-- t is temp textbox and change the visible property to false
errcode := Populate_Group( rg_id );
Set_Lov_Property('lov2',GROUP_NAME,rg_id);
b2 := show_lov('lov2');
Delete_Group( rg_id );
END;
-Ras.
[Updated on: Mon, 17 April 2006 05:54] Report message to a moderator
|
|
|
|
Re: Call one LOV from another LOV for same field [message #168396 is a reply to message #167960] |
Thu, 20 April 2006 03:51 |
Shumyla
Messages: 16 Registered: March 2006
|
Junior Member |
|
|
I am working on real life scenaior, i want to choose a Position ID id from a LOV and based on its selection i want to show all possible designations fall under selected Position ID.
I am still unable to do this, although i got some code regarding this but i would not achieve what i want
Shumyla Aziz
|
|
|
Re: Call one LOV from another LOV for same field [message #168524 is a reply to message #168396] |
Thu, 20 April 2006 19:59 |
|
djmartin
Messages: 10181 Registered: March 2005 Location: Surges Bay TAS Australia
|
Senior Member Account Moderator |
|
|
The code previously listed in this thread will probably work for you. Basically, in your When-Button-Pressed trigger code do the first LOV which populates hidden fields which are part of the second LOV's record group, then in the same trigger code do a second Show_Lov that then populates your displayed field.
David
|
|
|