Home » Developer & Programmer » Forms » Error : Using Combo Box .
icon5.gif  Error : Using Combo Box . [message #213102] Tue, 09 January 2007 08:42 Go to next message
lunate
Messages: 74
Registered: October 2006
Location: Pakistan
Member

HI ALL,
i have a problem with dynamic combo .
Quote:
i want to use comb-box instead of LOV.
for that i open my form 6i and

>conn scott/tiger.

>create datablock emp.

>change the properties-palette of dept no as 'LIST ITEM' and clear values from 'element in list 'property and set 'list style' property as combo.
then write the following codeon the "when-new-from-instance" of module.


DECLARE
R_ID RECORDGROUP;
STATUS NUMBER;
list_id item:=find_item('DEPTNO');
BEGIN
R_ID:=CREATE_GROUP_FROM_QUERY('RG_P','SELECT DNAME,DEPTNO FROM DEPT');
STATUS:=POPULATE_GROUP('RG_P');
POPULATE_LIST('DEPTNO',R_ID);
if id_null(R_ID) then
message(status) ;

else

message('list_id');
end if;
END;

but when i compile my form i got error >>

frm-32082 : invalid value fromgiven item type.
list deptno
item:deptno
block :emp
form :module1
frm-30085:unable toadjust form for output.


i have also try and change the 'data type' property of 'DEPTNO' from number to 'char' and set 'length' to 20 . but
at this time form execute successfulybut igot an other error >>

Quote:
frm-41336 :populate_list:invalid column type for column 2.


can someone help me to solve my problem ?

regrads.

[Updated on: Tue, 09 January 2007 08:48]

Report message to a moderator

Re: Error : Using Combo Box . [message #213457 is a reply to message #213102] Wed, 10 January 2007 18:14 Go to previous messageGo to next message
djmartin
Messages: 10180
Registered: March 2005
Location: Canberra ACT Australia
Senior Member
Account Moderator
I strongly recommend that you review the sample code for 'CREATE_GROUP_FROM_QUERY' and 'POPULATE_LIST' and 'ADD_LIST_ELEMENT' in the reference manual. I believe that you have 'DEPTNO' for two different purposes. I suggest using the 'list_id' version of the calls instead of the 'list_name' version of the calls, I find it less confusing. I also suggest using the 'block' name as well as the 'item' name in the 'find_item' statement.

David
Error : Using Combo Box . [message #413460 is a reply to message #213102] Wed, 15 July 2009 19:52 Go to previous message
fcossio@gua.net
Messages: 1
Registered: July 2009
Junior Member
Please, modify your query and convert the second column to character using the function To_Char. Example:

Select dname, To_Char(DeptNo) From Dept

It will work!!

Best regards

Fernando Cossío
Previous Topic: form not showing 'transaction complete: n records saved'
Next Topic: webutil to run proc in forms 10g
Goto Forum:
  


Current Time: Sun Dec 04 21:02:52 CST 2016

Total time taken to generate the page: 0.27999 seconds