oracle 如何在oracle表单中获取列表项中所选项目的文本?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/3004699/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-10 02:37:50  来源:igfitidea点击:

how I can get text of selected item in list item in oracle forms?

oracleoracleforms

提问by Amir

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.

列表项涉及列表元素和列表项值。
我的列表项值与它们的文本不同 我想知道如何获取所选项目文本。
(它相同的 az 组合框,我需要所选项目的文本)
请帮助我。

回答by Tony Andrews

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_LIST_ELEMENT_LABEL('MY_LIST_ITEM',i);
      END IF;
   END LOOP;
END;