6 Replies Latest reply: Apr 14, 2013 3:58 AM by GregorM RSS

    create lov at run time in  oracle form 10g

    khan786
      i want to create a lov and record group dynamically at run time..
      i have the code in when-form-instance..

      Declare
      v_lov lov;
      rg_id recordgroup;
      gc_id groupcolumn;
      tem_num number;
      v_rg_id number;

      begin
      rg_id := find_group('My group');
      if id_null(rg_id) then
      rg_id := Create_group('My_group');
      gc_id := add_group_column(rg_id,'emp_id',number_column);
      gc_id := add_group_column(rg_id,'ename',char_column,15);
      end if;
      v_rg_id := POPULATE_GROUP_WITH_QUERY('My_group','select t.employee_id,t.first_name from employee_mt t where t.employee_id in (103,104,106)');
      --tem_num :=populate_group(rg_id);
      v_lov := find_lov ('LOV_NAME');
      set_lov_property(v_lov,group_name,'My_group');
      set_item_property('VEH_SEARCH.TXT_VEH_CODE',lov_name,'lov');

      End;

      now i have problem...whether i create first a lov and record group at design time or not????
      if i create a lov and have the recordgroup column then what is the benefit of dynamically lov...???
      thanks