Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Oracle Forms: Master Detail form


Published on

Oracle Master detail Forms

Published in: Software
  • Be the first to comment

  • Be the first to like this

Oracle Forms: Master Detail form

  1. 1. Controlling Data Block Relationships
  2. 2. Objectives • Define block coordination • Coordinate data blocks by using REF relations • Describe the characteristics and principles of relation-handling code • System Variables for obtaining relation handling information • Implement a coordination-type toggle • Force one commit per master record
  3. 3. Relations • Logical objects that handle the relationship between two blocks • Created implicitly with a master-detail form module • Created explicitly with the New Relation dialog box
  4. 4. Block Coordination • Coordination-causing event • Block-coordination phases: – Clear phase executed before change of master record – Populate phase executed after change of master record • Implementation of block coordination: – The Copy Value from Item property – Relation-handling triggers – Relation-handling procedures
  5. 5. Creating REF Relationships
  6. 6. Characteristics of Relation-Handling Triggers • On-Clear-Details: Implements the Clear phase • On-Populate-Details: Implements the Populate phase • On-Check-Delete-Master: Implements the restricted-delete rule • Effect of trigger failure
  7. 7. Principles of Relation-Handling Code Three relation-handling procedures: • CLEAR_ALL_MASTER_DETAILS • QUERY_MASTER_DETAILS • CHECK_PACKAGE_FAILURE Adding your own code to relation-handling triggers: • Forms adds comments around code. • You add your own code before or after these comments.
  8. 8. Obtaining Relation-Handling Information System variables for relation handling: • SYSTEM.MASTER_BLOCK • SYSTEM.COORDINATION_OPERATION Built-ins for relation handling: • GET_FORM_PROPERTY • GET/SET_BLOCK_PROPERTY • GET/SET _RELATION_PROPERTY
  9. 9. Implementing Coordination-Type Toggle Define a procedure that toggles between immediate and deferred coordination • Use GET_BLOCK_PROPERTY to obtain relation name. • Use GET_RELATION_PROPERTY to obtain current coordination type. • Use SET_RELATION_PROPERTY to switch to other coordination type. Call this procedure from: • When-Checkbox-Changed trigger • Menu item of type Check
  10. 10. Forcing a Commit Per Master Define a procedure that: • Updates the commit status by performing validation • Checks the commit status of the master record • Raises FORM_TRIGGER_FAILURE in case of changes Call the procedure: • In the On-Clear-Details trigger • Before the “Begin default relation program section” comment
  11. 11. Summary • Define Relation coordination properties • Manage data block coordination – Coordination-causing events change the master record – Clear and populate • System Variables for obtaining relation handling information