insert record into lov through oracle custom forms [message #597798] |
Tue, 08 October 2013 08:46 ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
![](//www.gravatar.com/avatar/95c9b98450e177e0af71a941ba0ac6da?s=64&d=mm&r=g) |
nkumar0130
Messages: 55 Registered: August 2013 Location: Bangalore
|
Member |
|
|
Hi,
I have a LOV in a custom oracle forms.this lov is linked to a record group.
Presently the column on which lov is created does not contain any value.
I want to insert value into the lov through the forms.
I am not able to insert data into it through forms
Can any one please help me to resolve the above issue.
Thanks
|
|
|
|
|
|
|
|
|
|
|
Re: insert record into lov through oracle custom forms [message #597818 is a reply to message #597810] |
Tue, 08 October 2013 09:47 ![Go to previous message Go to previous message](/forum/theme/orafaq/images/up.png) ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
![](//www.gravatar.com/avatar/1229663c86eb1a441385fe710cd9116e?s=64&d=mm&r=g) |
mughals_king
Messages: 392 Registered: January 2012 Location: pakistan
|
Senior Member |
|
|
which version of form you are using 2ndly are you trying to create dynamic Lov still dont understand i sent already example form which working fine if you are trying to create dynamiclly lov thn try this.
PROCEDURE country IS
BEGIN
DECLARE
rg_country RECORDGROUP;
vTemp NUMBER;
BEGIN
rg_country:=CREATE_GROUP_FROM_QUERY('rg_country', ' select '||'''' ||'-----COUNTRY-----'||'''' || 'country_name ,' || ''''||'FFF' ||''''|| ' country_code from dual union
SELECT country_name, country_code FROM country_codes order by country_name');
vTemp:=POPULATE_GROUP(rg_country);
POPULATE_LIST('awog.country_code', rg_country);
if not id_null(rg_country) then
delete_group(rg_country);
end if;
END;
/
PROCEDURE state IS
BEGIN
DECLARE
rg_state RECORDGROUP;
vTemp NUMBER;
BEGIN
rg_state:=CREATE_GROUP_FROM_QUERY('rg_state',
'select '||'''' ||'-----STATE-----'||'''' || 'state_name ,' || ''''||'FFF' ||''''|| ' state_code from dual union
SELECT state_NAME,state_CODE FROM state_codes WHERE country_CODE='||':awog.country_code order by state_name');
---'SELECT description state_NAME,state_CODE FROM state WHERE country_CODE='||'Country_code'||' ORDER BY state_NAME');
SET_RECORD_PROPERTY(:system.cursor_record,'AWOG',status,new_status);
vTemp:=POPULATE_GROUP(rg_state);
POPULATE_LIST('awog.state_code', rg_state);
if not id_null(rg_state) then
delete_group(rg_state);
end if;
END;
end;
/
PROCEDURE lga IS
BEGIN
DECLARE
rg_lga RECORDGROUP;
vTemp NUMBER;
BEGIN
rg_lga:=CREATE_GROUP_FROM_QUERY('rg_lga','select '||'''' ||'------LGA-----'||'''' || 'lga_name ,' || ''''||'FFF' ||''''|| ' lga_code from dual union
SELECT LGA_NAME,LGA_CODE FROM LGA_codes WHERE STATE_CODE='||':awog.STATE_CODE'||' and country_code='||':awog.country_code order by lga_name');
SET_RECORD_PROPERTY(:system.cursor_record,'AWOG',status,new_status);
vTemp:=POPULATE_GROUP(rg_lga);
---clear_list('awog.lga_code');
POPULATE_LIST('awog.lga_code', rg_lga);
if not id_null(rg_lga) then
delete_group(rg_lga);
end if;
END;
end;
the first procedure is called at when-new-form instance of the form
,state is called to populate field state_code at when-list-change of item country_code and lga is called at when- list-change of state_code
Regard
Mughal
|
|
|
|
|
|