Re: Forms 4.5 LOV with NULLs

From: Gary Cole <cole_at_ici.net>
Date: 1997/10/25
Message-ID: <01bce0e4$3cf53740$120cb4cf_at_Cole.ici.net>#1/1


I hope this helps.

   SELECT '', '', '', 1

      FROM DUAL
      UNION
   (SELECT column1, column2, column3, 2 
       FROM table1

    WHERE .............)
ORDER BY 4,1; NOTES:
  1. This assumes You are selecting 3 columns from the table.
  2. The ORDER BY 4,1 first orders by the 4th column returned and therefore the null value is on the top of the list, and order by the 1st column returned (change to whatever you want).
  3. The columns in both selects have to match data types so use the TO_NUMBER, TO_CHAR, and TO_DATE functions.
  4. When mapping the columns to items on the form you will probably notice wierd column names this is because of the union and the TO.. functions. Map them in the order that you select them fromm the database.

I use the same code to put the null value at the top of a poplist, but never for an LOV. Of course, I remove the last entry in the list so not to have two NULLS.

If you have any problems drop me a message.

                Gary..

kverdon <kverdon_at_boco.co.gov> wrote in article <3450FAC1.3005_at_boco.co.gov>...
> I have created an LOV from a query record group. I would like the user
> to be able to select a null value from the LOV. Is there any way to do
> this without having a null entry in the table from which the record
> group is created?
>
> Thanks in advance, Tracey
>
Received on Sat Oct 25 1997 - 00:00:00 CEST

Original text of this message