This content has been marked as final. Show 6 replies
have searched the web with no success.i dis-agree with u in this :)
Any way pls. try the following...
/* WHEN-NEW-FORM-INSTANCE Trigger*/
Hope this helps...
DECLARE rg_countries RECORDGROUP; rg_name VARCHAR2(40) := 'country'; vTemp NUMBER; BEGIN -- Pls make sure Group doesn't already exist rg_countries := FIND_GROUP(rg_name); -- If it doesn't exist then create it and add ur query to it IF Id_Null (rg_countries) THEN rg_countries:=CREATE_GROUP_FROM_QUERY(rg_name , 'SELECT country_name NAME, COUNTRY_ID VALUE FROM COUNTRY ORDER BY 2'); --Populate the Record Group vTemp:=POPULATE_GROUP(rg_countries); POPULATE_LIST('BLOCK3.COUNTRIES', rg_name); END;
Thank you for your response.
The problem is when you have 2 drop down lists.
Drop down list 2 depends on the value that it is selected in Drop down list 1
somehow on list changed of Drop down list 1 i want the Drop down list 2 to be filtered.
can you provide some example on this please.
and well tested also :) Supposed i have 1st list the DNAME and the following example will display the emp_name
-- for the Second list here u have to get the e.g. DEPTNO
-- in order to be changed according to the first list-item selection of e.g. DNAME
In When-List-Changed of the Firsr List Say the Dept_List u have to write the following code...
BEGIN SELECT DEPTNO INTO :DEPTNO FROM DEPT WHERE DNAME = :DNAME; EXCEPTION WHEN NO_DATA_FOUND THEN NULL; WHEN OTHERS THEN (ERRTXT); END; -- Here u make the list DNAME changed accordingly depending on the DNAME list selection & filtered by the deptno... DECLARE rg_city RECORDGROUP; rg_name VARCHAR2(40) := 'EMP'; list_id Item := Find_Item('EMP.ENAME'); vTemp NUMBER; BEGIN -- Pls make sure Group doesn't already exist rg_city := FIND_GROUP(rg_name); IF NOT id_null(rg_city) then Delete_Group(rg_name); End if; -- If it doesn't exist then create it and add ur query to it rg_city :=CREATE_GROUP_FROM_QUERY(rg_name , 'SELECT ENAME , ENAME FROM EMP WHERE EMP.DEPTNO = '|| :DEPT.DEPTNO); SET_RECORD_PROPERTY(:system.cursor_record,'EMP',status,new_status); vTemp:=POPULATE_GROUP(rg_name); POPULATE_LIST('EMP.ENAME', rg_name); END;
Edited by: Abdetu on Mar 8, 2011 4:41 AM