The above example is about List of Values.
You can also set item's List Style property to Poplist, property Elements in List:
List Elements -> US
List item value -> US
and then:
1. Create a Record Group -> RG1: select state_name,state_code from states order by state_name;
2. Create a procedure Set_List_Item for population list item:
PROCEDURE Set_List_Item IS
item_1 item:=find_item('my_block.
rg_1 VARCHAR2(20):='RG1';
status NUMBER;
BEGIN
CLEAR_LIST(item_1);
status := Populate_Group( rg_1);
POPULATE_LIST(item_1,rg_1)
END;
3. call Set_List_Item in a When-New-Form-Instance trigger.
Main Topics
Browse All Topics





by: flow01Posted on 2009-10-04 at 08:20:10ID: 25489446
create an new lov using the wizard
sql : select state_code, state_name from states order by state_name
Assign a width of 0 (don't display) for state_code.
Assign the item state_code as return item for state_code.
Assing the lov to the item state_code.
Open the properties sheet of state_code and set 'validate from list' in the lov block to yes.
The user can activate the list of values by using the lov-key when on the state_code item.
The lov wil pop-up if there is an invalid value in the state_code.
You can force the display of the list of values by an 'when_new_item_trigger' and state_code
with
begin
list_values;
end;