Hello,
I have a W-V-I trigger on a field which when the user eneters a value and tabs out a procdure is called which fetches records from a table and via OUT parameters feeds 'em back to fields in the form. Based upon the number of fethes, i.e. if greater then One rows then show an LOV else fill in the form feilds. If rows returned greater then 1 the call is made to a package. procedure as below
PROCEDURE p_show(pc_item_name IN VARCHAR2) IS
lc_group_name VARCHAR2(100);
ln_row_count NUMBER;
lc_block_name VARCHAR2(40) := UPPER(SUBSTR(pc_item_name,1,Instr(pc_item_name, '.') - 1));
ll_lov_id LOV := Find_Lov(Get_Item_Property(pc_item_name, LOV_NAME));
BEGIN
IF Name_In('SYSTEM.CURSOR_BLOCK') != lc_block_name THEN
Go_Block(lc_block_name);
END IF;
IF Name_In('SYSTEM.CURSOR_RECORD') != Name_In('SYSTEM.MOUSE_RECORD') THEN
Go_Record(To_Number(Name_In('SYSTEM.MOUSE_RECORD')) + 1 -
To_Number(Get_Block_Property(lc_block_name,TOP_RECORD)));
END IF;
IF NOT Id_Null(ll_lov_id) THEN
p_set_position(pc_item_name);
lc_group_name := Get_Lov_Property(ll_lov_id, GROUP_NAME);
ln_row_count := Populate_Group(lc_group_name);
Go_Item(pc_item_name);
Do_Key('List_Values');
END IF;
Problem using this method as oppossed to show_lov ('lov name'); is that the above error arises.
How can I work round this please????
I have a W-V-I trigger on a field which when the user eneters a value and tabs out a procdure is called which fetches records from a table and via OUT parameters feeds 'em back to fields in the form. Based upon the number of fethes, i.e. if greater then One rows then show an LOV else fill in the form feilds. If rows returned greater then 1 the call is made to a package. procedure as below
PROCEDURE p_show(pc_item_name IN VARCHAR2) IS
lc_group_name VARCHAR2(100);
ln_row_count NUMBER;
lc_block_name VARCHAR2(40) := UPPER(SUBSTR(pc_item_name,1,Instr(pc_item_name, '.') - 1));
ll_lov_id LOV := Find_Lov(Get_Item_Property(pc_item_name, LOV_NAME));
BEGIN
IF Name_In('SYSTEM.CURSOR_BLOCK') != lc_block_name THEN
Go_Block(lc_block_name);
END IF;
IF Name_In('SYSTEM.CURSOR_RECORD') != Name_In('SYSTEM.MOUSE_RECORD') THEN
Go_Record(To_Number(Name_In('SYSTEM.MOUSE_RECORD')) + 1 -
To_Number(Get_Block_Property(lc_block_name,TOP_RECORD)));
END IF;
IF NOT Id_Null(ll_lov_id) THEN
p_set_position(pc_item_name);
lc_group_name := Get_Lov_Property(ll_lov_id, GROUP_NAME);
ln_row_count := Populate_Group(lc_group_name);
Go_Item(pc_item_name);
Do_Key('List_Values');
END IF;
Problem using this method as oppossed to show_lov ('lov name'); is that the above error arises.
How can I work round this please????