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

GET_RELATION_PROPERTY Built-in

Description

Returns the state of the given relation property.

Syntax

FUNCTION GET_RELATION_PROPERTY
(relation_id Relation,
property
NUMBER);

FUNCTION GET_RELATION_PROPERTY
(relation_name VARCHAR2,
property
NUMBER);

Built-in Type unrestricted function

Returns VARCHAR2

Enter Query Mode yes

Parameters

relation_id 
 
Specifies the unique ID Oracle Forms assigns when it creates the relation. Use the FIND_RELATION Built-in to return the ID to an appropriately typed variable. The data type of the ID is Relation.
 
relation_name 
 
Specifies the VARCHAR2 name you gave to the relation when you defined it, or the name that Oracle Forms assigned to the relation when created.
 
property 
 
Specifies the property for which you want the current state. The property constants you can use are as follows:

AUTO_QUERY Returns the VARCHAR2 value TRUE if the Auto Query relation property is Yes, FALSE if it is No. When the Deferred relation property is set to Yes, this property determines whether Oracle Forms automatically populates the detail block when a different record becomes the current record in the master block.

DEFERRED_COORDINATION Returns the VARCHAR2 value TRUE if the Deferred relation property is Yes, FALSE if it is No. This property determines whether the detail block is to be immediately coordinated with the current master record, or left clear until the operator navigates to the detail block.

DETAIL_NAME Returns the VARCHAR2 name of the detail block in the given master-detail relationship.

MASTER_DELETES Returns one of the following VARCHAR2 values to indicate the current setting of the block's Delete Record Behavior property: NON_ISOLATED, ISOLATED, or CASCADING.

MASTER_NAME Returns the VARCHAR2 name of the master block in the given master-detail relationship.

NEXT_DETAIL_RELATION Returns the VARCHAR2 name of the next detail relation, if one exists. To get the name of the first detail for a given block, issue a call to GET_BLOCK_PROPERTY. Returns NULL if none exists.

NEXT_MASTER_RELATION Returns the VARCHAR2 name of the next relation, if one exists. To get the name of the first relation for a given block, issue a call to GET_BLOCK_PROPERTY. Returns NULL if one does not exist.

PREVENT_MASTERLESS_OPERATION Returns the VARCHAR2 value TRUE if this relation property is Yes, FALSE if it is No. When set to Yes, Oracle Forms does not allow records to be inserted in the detail block when there is no master record in the master block, and does not allow querying in the detail block when there is no master record from the database.

GET_RELATION_PROPERTY Examples

/*

** Built-in: GET_RELATION_PROPERTY
** Example: If the relation is not deferred, then go
** coordinate the detail block. Otherwise, mark
** the detail block as being in need of
** coordination for an eventual deferred query.
*/
PROCEDURE Query_The_Details(rel_id Relation,
detail VARCHAR2) IS
BEGIN
IF Get_Relation_Property(rel_id, DEFERRED_COORDINATION)
= 'FALSE' THEN
Go_Block(detail);
IF NOT Form_Success THEN
RAISE Form_Trigger_Failure;
END IF;
Execute_Query;
ELSE
Set_Block_Property(detail, coordination_status,
NON_COORDINATED);
END IF;
End;


SET_RELATION_PROPERTY Built-in