Home » Developer & Programmer » Forms » Solution from populate POPLIST (Oracle Foms 6i, Windows)
Solution from populate POPLIST [message #502154] Mon, 04 April 2011 18:18 Go to next message
EstebanXRK
Messages: 2
Registered: April 2011
Location: Brazil
Junior Member
-- Solution populate poplist
----------------------------
-- Name of block: block01
-- Name of poplist item: year
-- Name table: tb_years
-- Create on trigger when-new-form-instance
declare
cursor c_cur is
select y.year
from tb_years y
order by 1 desc;
begin
clear_list('block01.year');
for r in c_cur loop
add_list_element('block01.year',c_cur%rowcount + 1 , r.year,r.year);
end loop;
:block01.year := get_list_element_value('block01.year', 1);
end;
Re: Solution from populate POPLIST [message #502156 is a reply to message #502154] Mon, 04 April 2011 23:58 Go to previous messageGo to next message
Littlefoot
Messages: 21818
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Is there a hidden question there?
Re: Solution from populate POPLIST [message #502219 is a reply to message #502156] Tue, 05 April 2011 05:26 Go to previous messageGo to next message
EstebanXRK
Messages: 2
Registered: April 2011
Location: Brazil
Junior Member
No, I saw that many people here have questions about this subject, and this solution is really easy I think I can help many people.
Re: Solution from populate POPLIST [message #502220 is a reply to message #502219] Tue, 05 April 2011 05:37 Go to previous message
cookiemonster
Messages: 13938
Registered: September 2008
Location: Rainy Manchester
Senior Member
That code should error.
It creates elements with the list index starting at 2.
It then looks for the value for index 1 which won't exist.

Also can you please read and follow the orafaq forum guide - especially the part on how to format your post.
Previous Topic: Developer 10g and Developer 6i on same machine
Next Topic: frm 40375
Goto Forum:
  


Current Time: Mon Sep 16 12:55:41 CDT 2024