views:

192

answers:

2

Hi
List item involved List element and list item value.
my list item value is different from their text I want to know how I can get the selected item text.
(it same az combo box,i need the text of selected item)
plz help me.

+2  A: 

I am not sure if there is an easier way, but this should work:

DECLARE
   l_count INTEGER;
   l_text VARCHAR2(100);
BEGIN
   l_count := GET_LIST_ELEMENT_COUNT('MY_LIST_ITEM');
   FOR i in 1..l_count LOOP
      IF GET_LIST_ELEMENT_VALUE('MY_LIST_ITEM',i) = :MY_LIST_ITEM THEN
         l_text := GET_ITEM_LIST_LABEL('MY_LIST_ITEM',i);
      END IF;
   END LOOP;
END;
Tony Andrews
Are u sure? this part l_text := GET_ITEM_LIST_LABEL('MY_LIST_ITEM',l_count); just return same value
rima
if change second l_count with i,it's correct answer.
rima
Thanks, I corrected my code now.
Tony Andrews
A: 

Es un excelente comentario, solo que en vez de GET_ITEM_LIST_LABEL se pone GET_LIST_ELEMENT_LABE

Mauricio