I mean, if I want to move to another block when I change the value of text item. but if I use GO_BLOCK in WHEN-VALIDATE_ITEM trigger the compiler return restriction.
In order to move to another block when the value of item is changed, you must use the when-new-item-instance trigger of the next item in the sequence of items in the block or the when-new-record-instance trigger in the case the item is the last in the record and the proprety navigation sequence of the block is next record, and finially, the when-new-block-instance trigger if the navigation sequence is next block
U can go in two ways :
First one is :
U can go for two trigger at the block level
Example :
One is :
In KEY-NEXT-ITEM Trigger
--------------------------------
if < Condition > then
Go_Block('Block Name');
end if;
Second is :
In WHEN-MOUSE-CLICK Trigger
--------------------------------------
if < Condition > then
Go_Block('Block Name');
end if;
This will solve both from key board as well as thru mouse navigation.
Second one is :
Can do like this also, then u do not have to worry about by key board or mouse navigation.
WHEN-TIMER-EXPIRED
---------------------------
DECLARE
tm_name VARCHAR2(20);
BEGIN
tm_name := Get_Application_Property(TIMER_NAME);
IF tm_name = 'MY_TIMER' THEN
Go_block('Block Name');
END IF;
END;
WHEN-VALIDATE-ITEM
----------------------------
declare
t timer;
begin
if then
t :=create_timer('MY_TIMER', 1, NO_REPEAT);
end if;
end;
Bookmarks