Shifting List Item Values From One List To Another In Oracle Forms
2016-12-25 18:56
1371 查看
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
[align=center] [/align]
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
[align=center] [/align]
相关文章推荐
- Copy Records From One Data Block To Another Data Block In Oracle Forms
- Populate A List Item With Record Group In Oracle Forms Using Populate_List And Create_Group_From_Query Command
- Populate A List Item With Record Group In Oracle Forms Using Populate_List And Create_Group_From_Query Command
- Moving From Top To Bottom in Detailed Block in Oracle Forms
- Adding List Item Element At Runtime In Oracle Forms
- print out the path from one node to another in binary tree
- Using Timer to get history values from EDNA database, an error is prompted in the page : "Sys.WebForms.PageRequestManagerTimeout
- How to update multiple columns of one table using values from another table?
- Server.Transfer : Passing values from one page to another page
- An Example of Pre-Query and Post-Query Triggers in Oracle Forms With Using Display_Item to Highlight Dynamically
- Copy a table from one database to another in SQL Server 2005
- How To Commit Just One Data Block Changes In Oracle Forms
- How to move RAC Database ORACLE_HOME from one location to another one (Doc ID 1438719.1)
- Know How To Use Check Box Mapping Of Other Values Property In Oracle Forms
- Adding Value To Combo List at Runtime in Oracle Forms
- Move an installed (Open)Solars from one disk to another
- Computing the Relative Path from One Directory to Another(Python cookbook 2-22)
- How to get the password text in a text with password property from another process using C++ - 用C++如何从不同进程获取密码框文本
- BW--ABAP to copy aggregates from one cube to another
- How To Copy a System Image from One Device to Another