Searches the list of relations and returns a relation ID when it finds a valid relation with the given name. You must define an appropriately typed variable to accept the return value. Define the variable with a type of Relation.
FUNCTION FIND_RELATION
(relation_name VARCHAR2);
Built-in Type unrestricted function
Returns Relation
Enter Query Mode yes
/*
** Built-in: FIND_RELATION
** Example: Find the id of a relation before inquiring about
** multiple properties
*/
FUNCTION Detail_of( Relation_Name VARCHAR2 )
RETURN VARCHAR2 IS
rl_id Relation;
BEGIN
rl_id := Find_Relation( Relation_Name );
/*
** Signal error if relation does not exist
*/
IF Id_Null(rl_id) THEN
Message('Relation '||Relation_Name||' does not exist.');
RAISE Form_Trigger_Failure;
ELSE
RETURN Get_Relation_Property(rl_id,DETAIL_NAME);
END IF;
END;