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