Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: PL/SQL Question - URGENT

Re: PL/SQL Question - URGENT

From: Christopher Beck <clbeck_at_us.oracle.com>
Date: Fri, 24 Sep 1999 13:43:09 -0400
Message-ID: <PrfrN7HreIqIZGkA927B8QSHhlr2@4ax.com>


On Sat, 25 Sep 1999 00:49:56 +0800, "Jason Ekamper" <jasek_at_bigpond.com> wrote:

>Having a bit of a problem with the following code. This is a checkbox for
>passing whether a resource is availible on monday or not.
>
>DECLARE BLOCK
> MON varchar2(4):='';
>
>BEGIN BLOCK
> htp.tablerowopen;
> htp.tabledata('Monday', cattributes => ' width="77%"');
> htp.tabledata(htf.formcheckbox('MON', cvalue => '', cchecked => MON),
>calign => 'left');
> htp.tablerowclose;
> htp.tableclose;
>
>PROBLEM DESCRIPTION
>Mon is then passed to another procedure. If user select monday, no problems.
>If the user doesn't select monday, then the procedure fails. Overloading not
>a problem, but there is 7 variables like this (Mon - Sun). I have tried an
>array etc but no luck.
>
>Is there any way to set the value of the checkbox to 'N' if the user does
>not select it, and set it to 'Y' if the user does select it?

Sort of. What you need to do is change the procedure that accepts the submission of this form to default the value of MON to 'N'.

eg.

procedure accept_form(
  MON varchar2 default 'N',
  TUE varchar2 default 'N',
  ..
  SUN varchar2 default 'N' ) is
begin
  if MON <> 'N' then

hope this helps.

chris.

>
>Any help much appreciated. Thanks
>
>Jason Ekamper
>Jasek_at_bigpond.com
>

--
Christopher Beck
Oracle Corporation
clbeck_at_us.oracle.com
Reston, VA.



Opinions are mine and do not necessarily reflect those of Oracle Corporation Received on Fri Sep 24 1999 - 12:43:09 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US