Searches the list of valid blocks and returns a unique block ID. You must define an appropriately typed variable to accept the return value. Define the variable with a type of Block.
FUNCTION FIND_BLOCK
(block_name VARCHAR2);
Built-in Type unrestricted function
Returns Block
Enter Query Mode yes
/*
** Built-in: FIND_BLOCK
** Example: Return true if a certain blockname exists
*/
FUNCTION Does_Block_Exist( bk_name VARCHAR2 )
RETURN BOOLEAN IS
bk_id Block;
BEGIN
/*
** Try to locate the block by name
*/
bk_id := Find_Block( bk_name );
/*
** Return the boolean result of whether we found it.
** Finding the block means that its bk_id will NOT be NULL
*/
RETURN (NOT Id_Null(bk_id));
END;