Re: 4.5 LOV for LIST ITEM?
Date: 1996/03/12
Message-ID: <3145A30E.4AEA_at_ge.hydro.qc.ca>#1/1
KEURBG wrote:
>
> Does anyone know of a method for populating a LIST ITEM with a list of
> values
> based upon a select statement.?
>
> Any help will be appreciated.
>
> BillHi Bill,
- Create a record group with the appropriate select
select (the column you want to see in your list)
,(the key you want the list to return to you)
from ...
- If you want to see more than one column you need to concatenate then and use a non-proportionnal font
- Here is the code for populate your group.
PROCEDURE POPULATE_A_LIST IS
v_group_id RecordGroup; v_list_id Item; v_tampon number; v_end exception;
begin
v_list_id := Find_Item('your_list_name');
if id_null(v_list_id)
then
message('This list name does not exist!!!'); raise v_end;
end if;
v_group_id := find_group('your_record_group_name');
if id_null(v_group_id)
then
message('This record group does not exist!!!'); raise v_end;
end if;
v_tampon := POPULATE_GROUP(v_group_id);
clear_list(list_id);
if v_tampon = 0 /* The query was executed successfully */ then
populate_list(v_list_id,v_group_id); end if;
/* With version 1.2 of developer/2000 you must have at least two rows into
your list for the list to work. If you have one, when you gonna select
you item in the list, the list won't return you the code associate!!!.
If you use WHEN-LIST-CHANGED trigger, always check if the code return
is not null!.
*/
add_list_element(list_id,500,'<End of the list>',null);
exception
when v_end
then
null;
end;
Received on Tue Mar 12 1996 - 00:00:00 CET