SlideShare a Scribd company logo
1 of 12
13
Copyright © 2004, Oracle. All rights reserved.
Introduction to Triggers
13-2 Copyright © 2004, Oracle. All rights reserved.
Objectives
After completing this lesson, you should be able to do
the following:
• Define triggers
• Identify the different trigger categories
• Plan the type and scope of triggers in a form
• Describe the properties that affect the behavior of
a trigger
13-3 Copyright © 2004, Oracle. All rights reserved.
Trigger Overview
Event
Trigger types
Queries
Validation
Navigation
Interaction
Internal event
Errors/Messages
Others
PL/SQL
Fire
PL/SQL
PL/SQL
Which trigger would you use to perform complex calculations
after a user enters data into an item?
13-4 Copyright © 2004, Oracle. All rights reserved.
Grouping Triggers into Categories
Triggers may be grouped
into functional categories:
• Block processing
triggers
• Interface event triggers
• Master-detail triggers
• Message handling
triggers
• Navigational triggers
• Query-time triggers
• Transactional triggers
• Validation triggers
Triggers may be grouped
into categories based on
name:
• When-Event triggers
• On-Event triggers
• Pre-Event triggers
• Post-Event triggers
• Key triggers
13-6 Copyright © 2004, Oracle. All rights reserved.
Defining Trigger Components
What event? What action?
What level?
Type
Code
Scope
13-7 Copyright © 2004, Oracle. All rights reserved.
Trigger Type
• Pre-
• Post-
• When-
• On-
• Key-
• User-named
Type
Code
Scope
What event?
13-8 Copyright © 2004, Oracle. All rights reserved.
Trigger Type
Forms Builder Trigger Types
13-9 Copyright © 2004, Oracle. All rights reserved.
Trigger Code
• Statements
• PL/SQL
• User
subprograms
• Built-in
subprograms
Type
Code
Scope
What action?
13-10 Copyright © 2004, Oracle. All rights reserved.
Trigger Scope
Levels
• Form
• Block
• Item
Code
Scope
Type
What level?
13-11 Copyright © 2004, Oracle. All rights reserved.
Trigger Scope
Event
Event
Event
Order
Date
13-12 Copyright © 2004, Oracle. All rights reserved.
Specifying Execution Hierarchy
Form
level
Block
level
Item
level
On-Message
On-Message
On-Message
On-Error
On-Error
EH = After
EH = After
EH = Before
EH = Override
1
2
3
4
Event
Event
13-14 Copyright © 2004, Oracle. All rights reserved.
Summary
In this lesson, you should have learned that:
• Triggers are event-activated program units
• You can categorize triggers based on function or
name to help you understand how they work
• Trigger components are:
– Type: Defines the event that fires the trigger
– Code: The actions a trigger performs
– Scope: Specifies the level (form, block, or item) at
which the trigger is defined
• The Execution Hierarchy trigger property alters the
firing sequence of a trigger

More Related Content

What's hot

What's hot (20)

Oracle 10g Forms Lesson 11
Oracle 10g Forms Lesson 11Oracle 10g Forms Lesson 11
Oracle 10g Forms Lesson 11
 
Oracle forms les07
Oracle forms  les07Oracle forms  les07
Oracle forms les07
 
Les05
Les05Les05
Les05
 
Les16
Les16Les16
Les16
 
Les20
Les20Les20
Les20
 
Oracle 10g Forms Lesson 10
Oracle 10g Forms Lesson 10Oracle 10g Forms Lesson 10
Oracle 10g Forms Lesson 10
 
Les18
Les18Les18
Les18
 
Oracle forms les06
Oracle forms  les06Oracle forms  les06
Oracle forms les06
 
Les01
Les01Les01
Les01
 
Oracle forms les12
Oracle forms  les12Oracle forms  les12
Oracle forms les12
 
Oracle forms developer 10g vol1
Oracle forms developer 10g vol1Oracle forms developer 10g vol1
Oracle forms developer 10g vol1
 
Intro
IntroIntro
Intro
 
Oracle reports
Oracle reportsOracle reports
Oracle reports
 
Oracle Forms Introduction
Oracle Forms IntroductionOracle Forms Introduction
Oracle Forms Introduction
 
App c classicadmin2
App c classicadmin2App c classicadmin2
App c classicadmin2
 
Aloa - A Web Services Driven Framework for Automatic Learning Objcet Annotation
Aloa - A Web Services Driven Framework for Automatic Learning Objcet AnnotationAloa - A Web Services Driven Framework for Automatic Learning Objcet Annotation
Aloa - A Web Services Driven Framework for Automatic Learning Objcet Annotation
 
Inventor Content Center: Adding Information
Inventor Content Center:   Adding InformationInventor Content Center:   Adding Information
Inventor Content Center: Adding Information
 
Entity Framework 4
Entity Framework 4Entity Framework 4
Entity Framework 4
 
Oracle report from ppt
Oracle report from pptOracle report from ppt
Oracle report from ppt
 
Btg drupal meetup presentation 9 _12_11
Btg drupal meetup presentation 9 _12_11Btg drupal meetup presentation 9 _12_11
Btg drupal meetup presentation 9 _12_11
 

Viewers also liked

Oracle forms les03
Oracle forms  les03Oracle forms  les03
Oracle forms les03Abed Othman
 
Oracle forms les08
Oracle forms  les08Oracle forms  les08
Oracle forms les08Abed Othman
 
Oracle forms les14
Oracle forms  les14Oracle forms  les14
Oracle forms les14Abed Othman
 
Oracle forms les10
Oracle forms  les10Oracle forms  les10
Oracle forms les10Abed Othman
 
Oracle forms les23
Oracle forms  les23Oracle forms  les23
Oracle forms les23Abed Othman
 
Oracle forms les17
Oracle forms  les17Oracle forms  les17
Oracle forms les17Abed Othman
 
Oracle forms les19
Oracle forms  les19Oracle forms  les19
Oracle forms les19Abed Othman
 
Oracle forms les21
Oracle forms  les21Oracle forms  les21
Oracle forms les21Abed Othman
 
Oracle forms les18
Oracle forms  les18Oracle forms  les18
Oracle forms les18Abed Othman
 
Oracle forms les20
Oracle forms  les20Oracle forms  les20
Oracle forms les20Abed Othman
 
Oracle forms les05
Oracle forms  les05Oracle forms  les05
Oracle forms les05Abed Othman
 
Oracle forms les09
Oracle forms  les09Oracle forms  les09
Oracle forms les09Abed Othman
 
Oracle forms les11
Oracle forms  les11Oracle forms  les11
Oracle forms les11Abed Othman
 
Oracle forms les22
Oracle forms  les22Oracle forms  les22
Oracle forms les22Abed Othman
 
Oracle forms les25
Oracle forms  les25Oracle forms  les25
Oracle forms les25Abed Othman
 
Oracle forms les24
Oracle forms  les24Oracle forms  les24
Oracle forms les24Abed Othman
 
Oracle forms les15
Oracle forms  les15Oracle forms  les15
Oracle forms les15Abed Othman
 
Oracle forms les16
Oracle forms  les16Oracle forms  les16
Oracle forms les16Abed Othman
 
Oracle forms les04
Oracle forms  les04Oracle forms  les04
Oracle forms les04Abed Othman
 

Viewers also liked (19)

Oracle forms les03
Oracle forms  les03Oracle forms  les03
Oracle forms les03
 
Oracle forms les08
Oracle forms  les08Oracle forms  les08
Oracle forms les08
 
Oracle forms les14
Oracle forms  les14Oracle forms  les14
Oracle forms les14
 
Oracle forms les10
Oracle forms  les10Oracle forms  les10
Oracle forms les10
 
Oracle forms les23
Oracle forms  les23Oracle forms  les23
Oracle forms les23
 
Oracle forms les17
Oracle forms  les17Oracle forms  les17
Oracle forms les17
 
Oracle forms les19
Oracle forms  les19Oracle forms  les19
Oracle forms les19
 
Oracle forms les21
Oracle forms  les21Oracle forms  les21
Oracle forms les21
 
Oracle forms les18
Oracle forms  les18Oracle forms  les18
Oracle forms les18
 
Oracle forms les20
Oracle forms  les20Oracle forms  les20
Oracle forms les20
 
Oracle forms les05
Oracle forms  les05Oracle forms  les05
Oracle forms les05
 
Oracle forms les09
Oracle forms  les09Oracle forms  les09
Oracle forms les09
 
Oracle forms les11
Oracle forms  les11Oracle forms  les11
Oracle forms les11
 
Oracle forms les22
Oracle forms  les22Oracle forms  les22
Oracle forms les22
 
Oracle forms les25
Oracle forms  les25Oracle forms  les25
Oracle forms les25
 
Oracle forms les24
Oracle forms  les24Oracle forms  les24
Oracle forms les24
 
Oracle forms les15
Oracle forms  les15Oracle forms  les15
Oracle forms les15
 
Oracle forms les16
Oracle forms  les16Oracle forms  les16
Oracle forms les16
 
Oracle forms les04
Oracle forms  les04Oracle forms  les04
Oracle forms les04
 

Similar to Oracle forms les013

Oracle 10g Forms Lesson 13
Oracle 10g Forms Lesson 13Oracle 10g Forms Lesson 13
Oracle 10g Forms Lesson 13KAMA3
 
Oracle ADF Architecture TV - Development - Logging
Oracle ADF Architecture TV - Development - LoggingOracle ADF Architecture TV - Development - Logging
Oracle ADF Architecture TV - Development - LoggingChris Muir
 
Oracle ADF Architecture TV - Design - Designing for Security
Oracle ADF Architecture TV - Design - Designing for SecurityOracle ADF Architecture TV - Design - Designing for Security
Oracle ADF Architecture TV - Design - Designing for SecurityChris Muir
 
Log4j with selenium tutorial: How to Setup log4j logging in selenium automati...
Log4j with selenium tutorial: How to Setup log4j logging in selenium automati...Log4j with selenium tutorial: How to Setup log4j logging in selenium automati...
Log4j with selenium tutorial: How to Setup log4j logging in selenium automati...Chirag Thumar
 
ITAM Review Oracle Seminar NY Aspera Presentation
ITAM Review Oracle Seminar NY Aspera PresentationITAM Review Oracle Seminar NY Aspera Presentation
ITAM Review Oracle Seminar NY Aspera PresentationMartin Thompson
 
Deep dive nella supply chain della nostra infrastruttura cloud
Deep dive nella supply chain della nostra infrastruttura cloudDeep dive nella supply chain della nostra infrastruttura cloud
Deep dive nella supply chain della nostra infrastruttura cloudsparkfabrik
 
Meet up slides_mumbai_05022020_final
Meet up slides_mumbai_05022020_finalMeet up slides_mumbai_05022020_final
Meet up slides_mumbai_05022020_finalAkshata Sawant
 
IOUG at Coors Field ASH and AWR in EM12c!
IOUG at Coors Field ASH and AWR in EM12c!IOUG at Coors Field ASH and AWR in EM12c!
IOUG at Coors Field ASH and AWR in EM12c!Kellyn Pot'Vin-Gorman
 
Code and Pixels Profile IETM Software Provider 2023.pdf
Code and Pixels Profile IETM Software Provider 2023.pdfCode and Pixels Profile IETM Software Provider 2023.pdf
Code and Pixels Profile IETM Software Provider 2023.pdfs1000dcodeandpixels
 
16613874-Object-Oriented-Programming-Presentation.ppt
16613874-Object-Oriented-Programming-Presentation.ppt16613874-Object-Oriented-Programming-Presentation.ppt
16613874-Object-Oriented-Programming-Presentation.pptvsdfg
 
On making standards organizations & open source communities work hand in hand
On making standards organizations & open source communities work hand in handOn making standards organizations & open source communities work hand in hand
On making standards organizations & open source communities work hand in handBenjamin Cabé
 
Oracle JET, with JET Mobile Content
Oracle JET, with JET Mobile ContentOracle JET, with JET Mobile Content
Oracle JET, with JET Mobile ContentGeertjan Wielenga
 

Similar to Oracle forms les013 (20)

Intro To PL/SQL
Intro To PL/SQLIntro To PL/SQL
Intro To PL/SQL
 
Les13
Les13Les13
Les13
 
Oracle 10g Forms Lesson 13
Oracle 10g Forms Lesson 13Oracle 10g Forms Lesson 13
Oracle 10g Forms Lesson 13
 
L13 adding users
L13 adding usersL13 adding users
L13 adding users
 
LES02.ppt
LES02.pptLES02.ppt
LES02.ppt
 
Les01
Les01Les01
Les01
 
Oracle ADF Architecture TV - Development - Logging
Oracle ADF Architecture TV - Development - LoggingOracle ADF Architecture TV - Development - Logging
Oracle ADF Architecture TV - Development - Logging
 
Oracle ADF Architecture TV - Design - Designing for Security
Oracle ADF Architecture TV - Design - Designing for SecurityOracle ADF Architecture TV - Design - Designing for Security
Oracle ADF Architecture TV - Design - Designing for Security
 
Log4j with selenium tutorial: How to Setup log4j logging in selenium automati...
Log4j with selenium tutorial: How to Setup log4j logging in selenium automati...Log4j with selenium tutorial: How to Setup log4j logging in selenium automati...
Log4j with selenium tutorial: How to Setup log4j logging in selenium automati...
 
ITAM Review Oracle Seminar NY Aspera Presentation
ITAM Review Oracle Seminar NY Aspera PresentationITAM Review Oracle Seminar NY Aspera Presentation
ITAM Review Oracle Seminar NY Aspera Presentation
 
Developer day v2
Developer day v2Developer day v2
Developer day v2
 
Deep dive nella supply chain della nostra infrastruttura cloud
Deep dive nella supply chain della nostra infrastruttura cloudDeep dive nella supply chain della nostra infrastruttura cloud
Deep dive nella supply chain della nostra infrastruttura cloud
 
Meet up slides_mumbai_05022020_final
Meet up slides_mumbai_05022020_finalMeet up slides_mumbai_05022020_final
Meet up slides_mumbai_05022020_final
 
L14 assigning access
L14 assigning accessL14 assigning access
L14 assigning access
 
IOUG at Coors Field ASH and AWR in EM12c!
IOUG at Coors Field ASH and AWR in EM12c!IOUG at Coors Field ASH and AWR in EM12c!
IOUG at Coors Field ASH and AWR in EM12c!
 
Code and Pixels Profile IETM Software Provider 2023.pdf
Code and Pixels Profile IETM Software Provider 2023.pdfCode and Pixels Profile IETM Software Provider 2023.pdf
Code and Pixels Profile IETM Software Provider 2023.pdf
 
16613874-Object-Oriented-Programming-Presentation.ppt
16613874-Object-Oriented-Programming-Presentation.ppt16613874-Object-Oriented-Programming-Presentation.ppt
16613874-Object-Oriented-Programming-Presentation.ppt
 
D34010.pdf
D34010.pdfD34010.pdf
D34010.pdf
 
On making standards organizations & open source communities work hand in hand
On making standards organizations & open source communities work hand in handOn making standards organizations & open source communities work hand in hand
On making standards organizations & open source communities work hand in hand
 
Oracle JET, with JET Mobile Content
Oracle JET, with JET Mobile ContentOracle JET, with JET Mobile Content
Oracle JET, with JET Mobile Content
 

Recently uploaded

Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Zilliz
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingEdi Saputra
 
A Beginners Guide to Building a RAG App Using Open Source Milvus
A Beginners Guide to Building a RAG App Using Open Source MilvusA Beginners Guide to Building a RAG App Using Open Source Milvus
A Beginners Guide to Building a RAG App Using Open Source MilvusZilliz
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native ApplicationsWSO2
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...Zilliz
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FMESafe Software
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodJuan lago vázquez
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherRemote DBA Services
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...apidays
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobeapidays
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CVKhem
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxRustici Software
 
Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024The Digital Insurer
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...DianaGray10
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...apidays
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024The Digital Insurer
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businesspanagenda
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?Igalia
 

Recently uploaded (20)

Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
A Beginners Guide to Building a RAG App Using Open Source Milvus
A Beginners Guide to Building a RAG App Using Open Source MilvusA Beginners Guide to Building a RAG App Using Open Source Milvus
A Beginners Guide to Building a RAG App Using Open Source Milvus
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 

Oracle forms les013

  • 1. 13 Copyright © 2004, Oracle. All rights reserved. Introduction to Triggers
  • 2. 13-2 Copyright © 2004, Oracle. All rights reserved. Objectives After completing this lesson, you should be able to do the following: • Define triggers • Identify the different trigger categories • Plan the type and scope of triggers in a form • Describe the properties that affect the behavior of a trigger
  • 3. 13-3 Copyright © 2004, Oracle. All rights reserved. Trigger Overview Event Trigger types Queries Validation Navigation Interaction Internal event Errors/Messages Others PL/SQL Fire PL/SQL PL/SQL Which trigger would you use to perform complex calculations after a user enters data into an item?
  • 4. 13-4 Copyright © 2004, Oracle. All rights reserved. Grouping Triggers into Categories Triggers may be grouped into functional categories: • Block processing triggers • Interface event triggers • Master-detail triggers • Message handling triggers • Navigational triggers • Query-time triggers • Transactional triggers • Validation triggers Triggers may be grouped into categories based on name: • When-Event triggers • On-Event triggers • Pre-Event triggers • Post-Event triggers • Key triggers
  • 5. 13-6 Copyright © 2004, Oracle. All rights reserved. Defining Trigger Components What event? What action? What level? Type Code Scope
  • 6. 13-7 Copyright © 2004, Oracle. All rights reserved. Trigger Type • Pre- • Post- • When- • On- • Key- • User-named Type Code Scope What event?
  • 7. 13-8 Copyright © 2004, Oracle. All rights reserved. Trigger Type Forms Builder Trigger Types
  • 8. 13-9 Copyright © 2004, Oracle. All rights reserved. Trigger Code • Statements • PL/SQL • User subprograms • Built-in subprograms Type Code Scope What action?
  • 9. 13-10 Copyright © 2004, Oracle. All rights reserved. Trigger Scope Levels • Form • Block • Item Code Scope Type What level?
  • 10. 13-11 Copyright © 2004, Oracle. All rights reserved. Trigger Scope Event Event Event Order Date
  • 11. 13-12 Copyright © 2004, Oracle. All rights reserved. Specifying Execution Hierarchy Form level Block level Item level On-Message On-Message On-Message On-Error On-Error EH = After EH = After EH = Before EH = Override 1 2 3 4 Event Event
  • 12. 13-14 Copyright © 2004, Oracle. All rights reserved. Summary In this lesson, you should have learned that: • Triggers are event-activated program units • You can categorize triggers based on function or name to help you understand how they work • Trigger components are: – Type: Defines the event that fires the trigger – Code: The actions a trigger performs – Scope: Specifies the level (form, block, or item) at which the trigger is defined • The Execution Hierarchy trigger property alters the firing sequence of a trigger

Editor's Notes

  1. Objectives Triggers are one of the most important mechanisms that you can use to modify or add to the functionality of a form. In this lesson, you learn the essential rules and properties of triggers so that you can use them throughout your application.
  2. Trigger Overview A trigger is a program unit that is executed (fired) due to an event. As explained earlier, Forms Builder enables you to build powerful facilities into applications without writing a single line of code. You can use triggers to add or modify form functionality in a procedural way. As a result, you can define the detailed processes of your application. You write Forms Builder triggers in PL/SQL. Every trigger that you define is associated with a specific event. Forms Builder defines a vast range of events for which you can fire a trigger. These events include the following: Query-related events Data entry and validation Logical or physical navigation Operator interaction with items in the form Internal events in the form Errors and messages Events cause the activation, or firing, of certain trigger types. The next page shows the categories of triggers and when they fire. Which trigger would you use to perform complex calculations after a user enters data into an item?
  3. Trigger Categories Triggers may be categorized based on their functions: You can also categorize triggers based on their names:
  4. Trigger Components There are three main components to consider when you design a trigger in Forms Builder: Trigger type: Defines the specific event that will cause the trigger to fire Trigger code: The body of PL/SQL that defines the actions of the trigger Trigger scope: The level in a form module at which the trigger is defined—determining the scope of events that will be detected by the trigger
  5. Trigger Type The trigger type determines which type of event fires it. There are more than 100 built-in triggers, each identified by a specific name. Triggers are mostly fired by events within a form module. Menu modules can initiate an event in a form, but the form module owns the trigger that fires. The name of a trigger identifies its type. All built-in trigger types are associated with an event, and their names always contain a hyphen (-). For example: When-Validate-Item fires when Forms validates an item. Pre-Query fires before Forms issues a query for a block. Note: Database events that occur on behalf of a form can fire certain triggers, but these database triggers are different from Forms Builder triggers. Forms Builder supports user-named triggers as well as the standard built-in triggers. A user-named trigger is one that is named by the designer. These triggers fire only if called upon by another trigger or program unit using built-in code features.
  6. Trigger Type (continued) The first part of a trigger name (before the first hyphen) follows a standard convention; this helps you to understand the general nature of the trigger type, and plan the types to use.
  7. Trigger Code The code of the trigger defines the actions for the trigger to perform when it fires. Write this code as an anonymous PL/SQL block by using the PL/SQL Editor. You need to enter the BEGIN. . . END structure in your trigger text only if you start your block with a DECLARE statement or if you need to code subblocks. Statements that you write in a trigger can be constructed as follows: Standard PL/SQL constructs (assignments, control statements, and so on) SQL statements that are legal in a PL/SQL block; these are passed to the server Calls to user-named subprograms (procedures and functions) in the form, a library, or the database Calls to built-in subprograms and package subprograms Although you can include SQL statements in a trigger, keep in mind the following rules: INSERT, UPDATE, and DELETE statements can be placed in transactional triggers. These triggers fire during the commit process. Transaction control statements (COMMIT, ROLLBACK, SAVEPOINT) should not be included directly as SQL trigger statements. These actions are carried out automatically by Forms as a result of either commands or built-in procedures that you issue. If included in triggers, these commands are redirected to be handled by Forms. For example, COMMIT will issue a COMMIT_FORM.
  8. Trigger Scope The scope of a trigger is determined by its position in the form object hierarchy, that is, the type of object under which you create the trigger. There are three possible levels: Form level: The trigger belongs to the form and can fire due to events across the entire form. Block level: The trigger belongs to a block and can fire only when this block is the current block. Item level: The trigger belongs to an individual item and can fire only when this item is the current item. Some triggers cannot be defined below a certain level. For example, Post-Query triggers cannot be defined at item level, because they fire due to a global or restricted query on a block. By default, only the trigger that is most specific to the current location of the cursor fires.
  9. Trigger Scope (continued) Consider the example in the diagram above: When the cursor is in the Order_Date item, a message fires the On-Message trigger of the Order_Date item, because this is more specific than the other triggers of this type. When the cursor is elsewhere in the ORDERS block, a message causes the block-level On-Message trigger to fire, because its scope is more specific than the form-level trigger. (You are outside the scope of the item-level trigger.) When the cursor is in the ITEMS block, a message causes the form-level On-Message trigger to fire, because the cursor is outside the scope of the other two On-Message triggers. Note: The On-Message trigger fires whenever Forms displays a message. It is recommended that you code On-Message triggers only at the form level.
  10. Execution Hierarchy As already stated, when there is more than one trigger of the same type, Forms normally fires the trigger most specific to the cursor location. You can alter the firing sequence of a trigger by setting the execution hierarchy (EH) trigger property. The diagram above shows how setting EH affects the firing order of triggers: 1.Fires first 2.Fires second 3.Fires third 4.Fires independently Note: Broken lines indicate the analysis path before firing. EH stands for execution hierarchy.
  11. Execution Hierarchy (continued) Execution hierarchy (EH) is a trigger property that specifies how the current trigger code should execute if there is a trigger with the same name defined at a higher level in the object hierarchy. Setting EH for form level triggers has no effect, since there is no higher level trigger. Settings for execution hierarchy are: Override: Only the trigger most specific to the cursor location fires. This is the default. After: The trigger fires after firing the same trigger, if any, at the next highest level. Before: The trigger fires before firing the same trigger, if any, at the next highest level. In the cases of Before and After, you can fire more than one trigger of the same type due to a single event. However, you must define each trigger at a different level.
  12. Summary In this lesson, you should have learned the essential rules and properties for triggers. Triggers are event-activated program units. You can categorize triggers based on: Function: Block-processing, Interface event, Master-detail, Message-handling, Navigational, Query-time, Transactional, Validation Name: When-, On-, Pre-, Post-, Key- Trigger components include: The trigger type that defines the event that fires the trigger The trigger code that consists of a PL/SQL anonymous bloc The trigger scope that determines which events will be detected by the trigger; the three possible levels for a trigger are form, block, and item When an event occurs, the most specific trigger overrides the triggers at a more general level. This can be affected by the Execution Hierarchy trigger property.