Link to home
Start Free TrialLog in
Avatar of haf70
haf70

asked on

How to populate list in oracle form using a dynamic recordgroup based on an Sql which has varibales to be parsed at run time.

How to populate list in oracle form using a dynamic recordgroup based on an Sql which has varibales to be parsed at run time.
SOLUTION
Avatar of flow01
flow01
Flag of Netherlands image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of haf70
haf70

ASKER

Please see the procedure below which I am using to populate the the record group.
I am facing problem with the variables used in the query string.


PROCEDURE populate_hr_list IS
rg_id   RECORDGROUP :=NULL;
V_RG_NAME VARCHAR2(100);
V_STATUS NUMBER;
v_query varchar2(1000) :=NULL;
BEGIN
      V_RG_NAME := 'hr';
      CLEAR_LIST(:VARS.L1);
      
     rg_id := FIND_GROUP(V_RG_NAME);
      IF NOT ID_NULL(rg_id) THEN
         DELETE_GROUP(rg_id);
     END IF;
     v_query := 'select '|| :vars.a||', '|| :vars.b||' from dual';
     rg_id :=CREATE_GROUP_FROM_QUERY(V_RG_NAME ,V_QUERY);
     IF NOT ID_NULL(rg_id) THEN
       V_STATUS := POPULATE_GROUP(rg_id);
       POPULATE_LIST(:VARS.L1,rg_id);
    END IF;
    DELETE_GROUP(rg_id);
end;
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial