Home » Developer & Programmer » Forms » two database list item (oracel form 6i,database 9i,os unix)
two database list item [message #551165] Mon, 16 April 2012 01:25 Go to next message
hisham99
Messages: 106
Registered: October 2008
Location: united arab emirates
Senior Member
i have two database list item ,i need second list item read from first ,my problem i have this message when i try to change the list(can not popilate list from the record),
if i make the second list item non database it work ,
but it should be database item
my trigger is


---first list item
declare
rg_id recordgroup := find_group('grtype') ;
ln_error number;
begin
if not id_null(rg_id) then
ln_error := populate_group(rg_id) ;
if ln_error = 0 then
populate_list('type',rg_id) ;
else
message('Error in Populating Group') ;
end if;
end if;
end;

second list item

declare
r_ix recordgroup;
n number;
query_ok number;

begin
r_ix:=find_group('q2');
if not id_null(r_ix) then
delete_group('q2');
end if;
r_ix:=create_group_from_query('q2','select tdesc,to_char(tcode) from press.ast_rmvty where tmno=:type order by tcode');
n :=populate_group(r_ix);
populate_list('rvtype','q2');
end;


Re: two database list item [message #551191 is a reply to message #551165] Mon, 16 April 2012 03:16 Go to previous messageGo to next message
Michel Cadot
Messages: 68666
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
From your previous topics:

Michel Cadot wrote on Sun, 24 April 2011 13:01
First read OraFAQ Forum Guide, especially "How to format your post?" section.
Make sure that lines of code do not exceed 80 characters when you format.
Indent the code, use code tags and align the columns in result.
Use the "Preview Message" button to verify.
...


Michel Cadot wrote on Thu, 20 January 2011 18:45
...If you post a working Test case: create table and insert statements along with the result you want with these data then we will work with your table and data.

Before, Please read OraFAQ Forum Guide, especially "How to format your post?" section.
Make sure that lines of code do not exceed 80 characters when you format.
Indent the code, use code tags and align the columns in result.
Use the "Preview Message" button to verify.
Also always post your Oracle version, with 4 decimals.
...


Now it is there: OraFAQ Forum Guide and How to use [code] tags and make your code easier to read.

Regards
Michel


Re: two database list item [message #551205 is a reply to message #551191] Mon, 16 April 2012 05:14 Go to previous message
cookiemonster
Messages: 13925
Registered: September 2008
Location: Rainy Manchester
Senior Member
As Michel has pointed out, you have been asked before to use code tags.
We do this so that posted code is easy to read.
This makes it easier to help you.
Please do so next time.

As for your question. Don't use list items, dynamic list items never work properly because:
a) You can't clear a value from a list item if it's in use in any current record in the block. (this'll be the cause of your error)
b) If you try to query a record and the value in the db column that corresponds to the list item isn't recognized by the list item, the form will just not return the record and won't give an idication that it's done so.

Just use text items with LOV's, it'll make your life a whole lot simpler.
Previous Topic: frm-40735
Next Topic: Excel Charts. How to set title and labels
Goto Forum:
  


Current Time: Fri Jul 05 21:43:01 CDT 2024