Re: How do I capture values from a 'multiple' formselectopen?
Date: 1997/08/13
Message-ID: <33f30435.5858674_at_newshost>#1/1
[Quoted] You can use a pl/sql table of type varchar2 as any of the inputs to a pl/sql routine. the varchar2 table can be upto 2000 bytes 'wide'. If you have a URL like:
http://localhost/dcd/owa/someroutine?x=5&x=10
It would find a pl/sql table named "x" and pass 5 and 10 in as elements 1 and 2 in the table.
Here is an example:
create or replace package types
as
type array is table of varchar2(200) index by binary_integer;
empty array;
end;
/
create or replace
procedure multiple( p_data in types.array default types.empty )
is
begin
for i in 1 .. 100000 loop
begin
htp.p( p_data(i) || htf.br );
exception
when no_data_found then exit;
end;
end loop;
htp.formOpen( 'multiple' );
htp.formSubmit;
htp.formSelectOpen( 'p_data', '', 5, 'multiple' ); for x in ( select username from all_users where rownum < 50 ) loop
htp.formSelectOption( x.username );
end loop;
htp.formSelectClose;
htp.formClose;
end multiple;
/
show errors;
The declaration of the EMPTY table is important. You need to be able to default the table type as the user doesn't have to select anything in the list if they don't want to. You can't default a table to NULL, only to another table.
[Quoted] On Tue, 12 Aug 1997 14:52:14 -0600, craig.cardimon_at_bentley.com wrote:
>I know how to pass the value collected from a simple formselectopen, but
>how do I gather and pass multiple values collected from a 'multiple'
>formselectopen?
>
>-------------------==== Posted via Deja News ====-----------------------
> http://www.dejanews.com/ Search, Read, Post to Usenet
Thomas Kyte
tkyte_at_us.oracle.com
Oracle Government
Bethesda MD
http://govt.us.oracle.com/ -- downloadable utilities
Opinions are mine and do not necessarily reflect those of Oracle Corporation Received on Wed Aug 13 1997 - 00:00:00 CEST