GO_BLOCK navigates to an indicated block. If the target block is non-enterable, an error occurs.
PROCEDURE GO_BLOCK
(block_name VARCHAR2);
Built-in Type restricted procedure
Enter Query Mode no
/*
** Built-in: GO_BLOCK
** Example: Navigate to a block by name. Make sure to check
** that the Go_Block succeeds by checking FORM_SUCCESS.
*/
BEGIN
IF :Global.Flag_Indicator = 'NIGHT' THEN
Go_Block('Night_Schedule');
/*
** One method of checking for block navigation success.
*/
IF NOT FORM_SUCCESS THEN
RAISE Form_Trigger_Failure;
END IF;
ELSIF :Global.Flag_Indicator = 'DAY' THEN
Go_Block('Day_Schedule');
/*
** Another way of checking that block navigation
** succeeds. If the block the cursor is in hasn't
** changed after a block navigation, something went
** wrong. This method is more reliable than simply
** checking FORM_SUCCESS.
*/
IF :System.Trigger_Block = :System.Cursor_Block THEN
RAISE Form_Trigger_Failure;
END IF;
END IF;
Execute_Query;
Go_Block('Main');
END;