Re: How do you do this with a checkbox???

From: <pberetta_at_my-deja.com>
Date: Tue, 08 Feb 2000 00:57:21 GMT
Message-ID: <87nplf$gfl$1_at_nnrp1.deja.com>


Richard,
  Best trigger(s) to use for this would be a PRE-INSERT and a PRE- UPDATE (if updates are allowed).
DECLARE
all_types VARCHAR2(50);
BEGIN
   all_types := ' ';
   IF :block_name.box1 = 'SOFTWARE' THEN      all_types := all_types || 'SOFTWARE ';    END IF;
   IF :block_name.box2 = 'HARDWARE' THEN      all_types := all_types || 'HARDWARE ';    END IF;
   IF :block_name.box3 = 'DOCUMENTATION' THEN      all_types := all_types || 'DOCUMENTATION ';    END IF;
   IF :block_name.box4 = 'OTHER' THEN
     all_types := all_types || 'OTHER';
   END IF;
   IF 1 = LENGTH(all_types) THEN
     :block_name.real_column_name := NULL;    ELSE
     :block_name.real_column_name := RTRIM(LTRIM(all_types));    END IF;
END;
Regards,
Paul

In article <389EF8D1.8B78A931_at_hsv.boeing.com>,   Richard Hollingsworth <william.hollingsworth_at_hsv.boeing.com> wrote:
> Hi folks. Thanks for reading this.
>
> I have an 8.0.5 database and I'm using Forms 2.1.
>
> I have a field in the db called "EFFECT_ON" which is a varchar2(10)
> filed.
>
> On my form, I wnat 4 checkboxes....1. Hardware, 2. Software, 3.
> Documentation, 4. Other.
>
> Rather than having 4 seperate fields in the db, I want just one.
>
> How do I get multiple values stuffed into this one field in the db?
>
> Can you group checkboxes like you can radio buttons?
>
> How about using a trigger that fires when you complete checking boxes
> that will use a select into statement that concatenates all four
> checkboxes and places that into the db field?
>
> Any ideas on how to do this will be greatly appreciated.
>
> Thanks,
>
> Richard Hollingsworth
>

Sent via Deja.com http://www.deja.com/
Before you buy. Received on Tue Feb 08 2000 - 01:57:21 CET

Original text of this message