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: Dynamic List Items in Forms 4.5

Re: Dynamic List Items in Forms 4.5

From: Andrew Tompkins <andrewto_at_kingfish.cse.tek.com>
Date: 1997/06/03
Message-ID: <ANDREWTO.97Jun3091935@kingfish.cse.tek.com>#1/1

In article <3392d5c4.803040_at_news.sas.ab.ca>   ken_at_fifthd.ca (Ken Ridgway) writes:

>
> Procedure Populate_list (p_list in varchar2)
>
> cursor c1
> select code, description from required_table;
> lv_index number := 0;
> begin
> clear_list(p_list);
> for l_rec in c1 loop
> lv_index := lv_index + 1;
> ADD_LIST_ELEMENT(p_list,
> lv_index,
> l_rec.Description,
> l_rec.code);
> end loop;
> end;
>

Clear_List() clears the indicated list and then creates the blank list item. I am assuming that the above code moves the blank item to the bottom of the list. After the end of the loop, delete the last element:

Delete_List_Element( p_list, lv_index+1 );

I'm not sure if you can delete the element leaving a list with no elements. You can try deleting it before entering the loop after clearing the list:

Delete_List_Element( p_list, 1 );

Check the on-line help or written documentation for other restrictions.

--Andy

-- 
-------------------------------------------------------
| Andrew G. Tompkins    | #include <disclaimer.std.h> |
| Software Design Eng.  ------------------------------|
| Tektronix, Inc.                                     |
| Phone: (503) 627-5172      fax: (503) 627-5548      |
| email: Andrew.Tompkins_at_tek.com (work)               |
|        andytom_at_teleport.com (home)                  |
| http://www.teleport.com/~andytom/                   |
-------------------------------------------------------
Received on Tue Jun 03 1997 - 00:00:00 CDT

Original text of this message

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