11.01.2013 Views

Oracle Forms Developer – Form Builder Reference, Volume 1

Oracle Forms Developer – Form Builder Reference, Volume 1

Oracle Forms Developer – Form Builder Reference, Volume 1

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

GET_RELATION_PROPERTY examples<br />

NEXT_DETAIL_RELATION Returns the VARCHAR2 name of the<br />

next detail relation, if one exists. To get the name of the first detail for a<br />

given block, issue a call to GET_BLOCK_PROPERTY. Returns NULL if<br />

none exists.<br />

NEXT_MASTER_RELATION Returns the VARCHAR2 name of the<br />

next relation, if one exists. To get the name of the first relation for a given<br />

block, issue a call to GET_BLOCK_PROPERTY. Returns NULL if one<br />

does not exist.<br />

PREVENT_MASTERLESS_OPERATION Returns the VARCHAR2<br />

value TRUE if this relation property is Yes, FALSE if it is No. When set to<br />

Yes, <strong>Form</strong> <strong>Builder</strong> does not allow records to be inserted in the detail block<br />

when there is no master record in the master block, and does not allow<br />

querying in the detail block when there is no master record from the<br />

database.<br />

/*<br />

** Built-in: GET_RELATION_PROPERTY<br />

** Example: If the relation is not deferred, then go<br />

** coordinate the detail block. Otherwise, mark<br />

** the detail block as being in need of<br />

** coordination for an eventual deferred query.<br />

*/<br />

PROCEDURE Query_The_Details(rel_id Relation,<br />

detail VARCHAR2) IS<br />

BEGIN<br />

IF Get_Relation_Property(rel_id, DEFERRED_COORDINATION)<br />

= ’FALSE’ THEN<br />

Go_Block(detail);<br />

IF NOT <strong>Form</strong>_Success THEN<br />

RAISE <strong>Form</strong>_trigger_Failure;<br />

END IF;<br />

Execute_Query;<br />

ELSE<br />

Set_Block_Property(detail, coordination_status,<br />

NON_COORDINATED);<br />

END IF;<br />

End;<br />

219

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!