Home » Developer & Programmer » Forms » insert record into lov through oracle custom forms
insert record into lov through oracle custom forms [message #597798] Tue, 08 October 2013 08:46 Go to next message
nkumar0130
Messages: 54
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 #597804 is a reply to message #597798] Tue, 08 October 2013 09:13 Go to previous messageGo to next message
mughals_king
Messages: 351
Registered: January 2012
Location: pakistan
Senior Member
go LOVs properties "colunm mapping properties" -click and check RETURN ITEMS

ok take example .fmb file just "Double click on empno"

Regard
Mughal

[Updated on: Tue, 08 October 2013 09:18]

Report message to a moderator

Re: insert record into lov through oracle custom forms [message #597807 is a reply to message #597804] Tue, 08 October 2013 09:25 Go to previous messageGo to next message
nkumar0130
Messages: 54
Registered: August 2013
Location: Bangalore
Member
Thanks Mughal,For your prompt response.
I had already set the "column mapping properties" while creating the lov.
Is there any other thing which I have to do, by which we can insert data into lov through forms lov column.

Thanks
Re: insert record into lov through oracle custom forms [message #597809 is a reply to message #597807] Tue, 08 October 2013 09:28 Go to previous messageGo to next message
cookiemonster
Messages: 10914
Registered: September 2008
Location: Rainy Manchester
Senior Member
what data is it supposed to show, is the record group based on a query?
Re: insert record into lov through oracle custom forms [message #597810 is a reply to message #597809] Tue, 08 October 2013 09:30 Go to previous messageGo to next message
nkumar0130
Messages: 54
Registered: August 2013
Location: Bangalore
Member
yes record group based on a query, but the query contain only one column from a table.
Re: insert record into lov through oracle custom forms [message #597811 is a reply to message #597810] Tue, 08 October 2013 09:37 Go to previous messageGo to next message
cookiemonster
Messages: 10914
Registered: September 2008
Location: Rainy Manchester
Senior Member
so the obvious answer to your problem is add data to the DB that satisfies the record group query. So what is stopping you?
Re: insert record into lov through oracle custom forms [message #597814 is a reply to message #597811] Tue, 08 October 2013 09:40 Go to previous messageGo to next message
nkumar0130
Messages: 54
Registered: August 2013
Location: Bangalore
Member
whenever i am trying to insert value into the lov through form, it is giving invalid column value..
the column data type for lov is varchar2, and i am inserting the char value in it.
so is there anything i have to do for it.
Re: insert record into lov through oracle custom forms [message #597816 is a reply to message #597814] Tue, 08 October 2013 09:46 Go to previous messageGo to next message
Littlefoot
Messages: 19510
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
I'm afraid you got it wrong. You don't "insert value into LoV". You use value from a LoV and insert it into a form item.

This is how I do that: first, I create a SELECT statement (that will be later used as a record group query) and test it in SQL*Plus. Once I'm satisfied with it, I simply copy/paste it into Forms while creating a record group. Finally, I create a LoV, following Wizard's questions; if you do it carefully, you can't fail. That's it.
Re: insert record into lov through oracle custom forms [message #597817 is a reply to message #597814] Tue, 08 October 2013 09:46 Go to previous messageGo to next message
cookiemonster
Messages: 10914
Registered: September 2008
Location: Rainy Manchester
Senior Member
I really have no idea what you think you're doing here, so explain in detail.
What exact code are you using to insert data into the lov?
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 messageGo to next message
mughals_king
Messages: 351
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
Re: insert record into lov through oracle custom forms [message #597819 is a reply to message #597818] Tue, 08 October 2013 09:51 Go to previous messageGo to next message
mughals_king
Messages: 351
Registered: January 2012
Location: pakistan
Senior Member
Dear upload your .FMB file here


Re: insert record into lov through oracle custom forms [message #597822 is a reply to message #597819] Tue, 08 October 2013 09:58 Go to previous messageGo to next message
mughals_king
Messages: 351
Registered: January 2012
Location: pakistan
Senior Member
Dear better you take help from here Click this Link

http://oracle-d2k-forms.blogspot.com/2011/03/lov-list-of-values.html


Regard
Mughal
Re: insert record into lov through oracle custom forms [message #598727 is a reply to message #597822] Thu, 17 October 2013 03:01 Go to previous message
nkumar0130
Messages: 54
Registered: August 2013
Location: Bangalore
Member
Thanks Mughal for your prompt response.
Previous Topic: Starting Reports with Forms and suppress empty reports
Next Topic: file open
Goto Forum:
  


Current Time: Wed Aug 27 22:16:32 CDT 2014

Total time taken to generate the page: 0.13469 seconds