Re: Any one uses DELETE_LIST_ELEMENT or ADD_LIST_ELEMENT?

From: Brian Membrey <horsemth_at_mel.switch.net.au>
Date: 1997/02/18
Message-ID: <01bc1df2$78265340$52a966cb_at_default>#1/1


The following procedure works fine. In this case, POS has already been identified (i.e the logical position in the alphabetic list) ... I can forward a procedure for this if it is of interest. Haven't specifically tried DELETE_LIST_ELEMENT as yet

PROCEDURE Insert_element (list_name VARCHAR2,
                          label     VARCHAR2,
                          value     VARCHAR2,
                          pos       NUMBER) IS
 list_id     ITEM;

 list_count NUMBER;
BEGIN
 list_id := FIND_ITEM(list_name);
 IF NOT ID_NULL(list_id) THEN
    IF nvl(pos,0) = 0 then                        /* if POS not set, add to
end of list */
       list_count := GET_LIST_ELEMENT_COUNT(list_id);
       ADD_LIST_ELEMENT(list_id, list_count+1, label, value);
    ELSE
       ADD_LIST_ELEMENT(list_id, pos, label, value);
    END IF;
 ELSE
   MESSAGE('Cannot insert into unknown list item ' || list_name);    RAISE FORM_TRIGGER_FAILURE;
 END IF;
END; Joe <kauj_at_lfs.loral.com> wrote in article <19970214.091955.931_at_lfs.loral.com>...
> Hi,
>
> I am currenty working on a form which has two lsit items(TList), ListA
 and
> ListB, and it looks like this on the form.
>
> ListA ListB
> +--------+ +-----+ +---------+
> |11 =====| | ==> | | |
> |22 | +-----+ | |
> |33 | +-----+ | |
> +--------+ | <== | +---------+
> +-----+
>
>
> This form will allow user to select one value from listA, and press
 ===>
> button to add to ListB.
>
> I tried to use ADD_LIST_ELEMENT on ListB, and DELETE_LIST_ELEMENT on
> ListA. Not working........
>
> Any help and idea will be appreciated. (Help....:)
>
> Please e-mail to joe.kau_at_lmco.com
>
  Received on Tue Feb 18 1997 - 00:00:00 CET

Original text of this message