Home » Developer & Programmer » Forms » Create lov and recordgroup dynamically
Create lov and recordgroup dynamically [message #581782] Wed, 10 April 2013 10:59 Go to next message
irfankundi786@yahoo.com
Messages: 221
Registered: February 2009
Location: pakistan
Senior Member

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
Re: Create lov and recordgroup dynamically [message #581783 is a reply to message #581782] Wed, 10 April 2013 11:02 Go to previous messageGo to next message
cookiemonster
Messages: 11070
Registered: September 2008
Location: Rainy Manchester
Senior Member
If it doesn't need to be dynamic don't make it dynamic.
This doesn't look like it needs to be dynamic
Re: Create lov and recordgroup dynamically [message #581784 is a reply to message #581783] Wed, 10 April 2013 11:06 Go to previous messageGo to next message
irfankundi786@yahoo.com
Messages: 221
Registered: February 2009
Location: pakistan
Senior Member

i have needed it to make dynamic and add column at run time...
now confused whether for the dynamic i first i create it at design time and for this i must create record group at design time???
Re: Create lov and recordgroup dynamically [message #581789 is a reply to message #581784] Wed, 10 April 2013 14:00 Go to previous messageGo to next message
cookiemonster
Messages: 11070
Registered: September 2008
Location: Rainy Manchester
Senior Member
You can't change the number of columns an LOV has at runtime.
What precisely are you trying to do?
Re: Create lov and recordgroup dynamically [message #582099 is a reply to message #581789] Sat, 13 April 2013 06:46 Go to previous messageGo to next message
irfankundi786@yahoo.com
Messages: 221
Registered: February 2009
Location: pakistan
Senior Member

Actually i want to create a lov at runtime and add column at runtime...
I don't need to create at design time..
pLease tell me the steps????
Re: Create lov and recordgroup dynamically [message #582125 is a reply to message #582099] Sat, 13 April 2013 11:25 Go to previous message
cookiemonster
Messages: 11070
Registered: September 2008
Location: Rainy Manchester
Senior Member
As I already said - you can't change the number of columns an LOV has at runtime.

You can create two separate LOVs with different number of columns at design time and change which is attached to the item at runtime.
Previous Topic: Order by the control block data using oracle 10g form
Next Topic: add a node in oracle tree
Goto Forum:
  


Current Time: Tue Oct 21 09:30:52 CDT 2014

Total time taken to generate the page: 0.08699 seconds