Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: Dynamic List Items in Forms 4.5
We have created a procedure to populate our list boxes. It should work fine from an on-validate-item trigger as well.
The only problem we have found is that we always end up with a blank record within the list. While this is desirable on an optional entry field it is a pain in the mandatory ones.
Anyway here it is...enjoy.
Ken.
=:^')
Procedure Populate_list (p_list in varchar2)
cursor c1
select code, description from required_table; lv_index number := 0;
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;
On Fri, 30 May 1997 09:54:56 -0400, Dan Stern <dstern_at_gte.net> wrote:
>I am trying to figure out how to set the list of items that appear in a
>list item. Because I don't feel I have explained this sufficiently, I
>will give an example.
>
>I have a "country" field and the options are Canada or United States.
>The next field is "State/Province", if Canada was selected, I would want
>to pull out the "list item" and the "list item value" from another table
>based on a sql search triggered by leaving the country field.
>
>Is that clear?
>
>I know I could use an LOV pop-up (but this is another modal window which
>I am trying to avoid), but I would really perfer a list item.
>
>Thanks,
>Dan
>dstern_at_ctp.com
Received on Mon Jun 02 1997 - 00:00:00 CDT
![]() |
![]() |