zoukankan      html  css  js  c++  java
  • Shifting List Item Values From One List To Another In Oracle Forms

    Suppose you have two T-List items in form and you want  to shift element values from one list to another in Oracle Forms, here is the example given below for the same. Create two buttons also between list items as shown in picture in the bottom of this blog. Create one button with label ">" and another with label "<".

    When-button-pressed trigger code for button with label ">":

    declare
        n number;
        vval varchar2(100);
    begin
        --- replace rightsidelist with your list name placed on right side
        --- replace leftsidelist with your list name placed at left side
          n := get_list_element_count('rightsidelist');
          add_list_element('rightsidelist', n + 1, :leftsidelist, :leftsidelist);
          --- delete element
          n := get_list_element_count('leftsidelist');
          for i in 1..n loop
                vval := get_list_element_value('leftsidelist',i);
               if vval = :leftsidelist then
                       delete_list_element('leftsidelist',i);
               end if;
          end loop;
    end;

    When-button-pressed trigger for button with label "<":

    declare
        n number;
        vval varchar2(100);
    begin
          n := get_list_element_count('leftsidelist');
          add_list_element('leftsidelist', n + 1, :rightsidelist, :rightsidelist);      
          
          --- delete element
          n := get_list_element_count('rightsidelist');
          for i in 1..n loop
                vval := get_list_element_value('rightsidelist',i);
               if vval = :rigtsidelist then
                       delete_list_element('rightsidelist',i);
               end if;
          end loop;
    end;

    See also:
    Create List Item In Oracle Forms 
     

  • 相关阅读:
    UVA10361
    △UVA10494
    △UVA465
    △UVA10106
    △UVA424
    阶乘的精确值
    小学生算术
    UVA156
    △UVA120
    linux应用之ntpdate命令联网同步时间
  • 原文地址:https://www.cnblogs.com/quanweiru/p/6220188.html
Copyright © 2011-2022 走看看