A script-enabled browser is required for this page to function properly.

FIND_RELATION Built-in

Description

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.

Syntax

FUNCTION FIND_RELATION
(relation_name VARCHAR2);

Built-in Type unrestricted function

Returns Relation

Enter Query Mode yes

Parameters

relation_name 
 
Specifies a valid VARCHAR2 relation name.

FIND_RELATION Examples

/*

** 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;


Referencing Oracle Forms objects by internal ID