SlideShare a Scribd company logo
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
Ad

More Related Content

What's hot (20)

Oracle 10g Forms Lesson 11
Oracle 10g Forms Lesson 11Oracle 10g Forms Lesson 11
Oracle 10g Forms Lesson 11
KAMA3
 
Oracle forms les07
Oracle forms  les07Oracle forms  les07
Oracle forms les07
Abed Othman
 
Les05
Les05Les05
Les05
Sudharsan S
 
Les16
Les16Les16
Les16
Sudharsan S
 
Les20
Les20Les20
Les20
Sudharsan S
 
Oracle 10g Forms Lesson 10
Oracle 10g Forms Lesson 10Oracle 10g Forms Lesson 10
Oracle 10g Forms Lesson 10
KAMA3
 
Les18
Les18Les18
Les18
Sudharsan S
 
Oracle forms les06
Oracle forms  les06Oracle forms  les06
Oracle forms les06
Abed Othman
 
Les01
Les01Les01
Les01
Sudharsan S
 
Oracle forms les12
Oracle forms  les12Oracle forms  les12
Oracle forms les12
Abed Othman
 
Oracle forms developer 10g vol1
Oracle forms developer 10g vol1Oracle forms developer 10g vol1
Oracle forms developer 10g vol1
abdull466
 
Intro
IntroIntro
Intro
Abrianto Nugraha
 
Oracle reports
Oracle reportsOracle reports
Oracle reports
Lacc Corona
 
Oracle Forms Introduction
Oracle Forms IntroductionOracle Forms Introduction
Oracle Forms Introduction
Sekhar Byna
 
App c classicadmin2
App c classicadmin2App c classicadmin2
App c classicadmin2
Naresh Kumar SAHU
 
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
Mohamed Amine Chatti
 
Inventor Content Center: Adding Information
Inventor Content Center:   Adding InformationInventor Content Center:   Adding Information
Inventor Content Center: Adding Information
Synergis Engineering Design Solutions
 
Entity Framework 4
Entity Framework 4Entity Framework 4
Entity Framework 4
richardrflores1
 
Oracle report from ppt
Oracle report from pptOracle report from ppt
Oracle report from ppt
kingshuk_goswami
 
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
Blackstone Technology Group | Federal
 

Viewers also liked (19)

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

Similar to Oracle forms les013 (20)

Intro To PL/SQL
Intro To PL/SQLIntro To PL/SQL
Intro To PL/SQL
um_adeveloper
 
Oracle 10g Forms Lesson 13
Oracle 10g Forms Lesson 13Oracle 10g Forms Lesson 13
Oracle 10g Forms Lesson 13
KAMA3
 
Les13
Les13Les13
Les13
Sudharsan S
 
L13 adding users
L13 adding usersL13 adding users
L13 adding users
Naresh Kumar SAHU
 
LES02.ppt
LES02.pptLES02.ppt
LES02.ppt
radwan47
 
Les01
Les01Les01
Les01
um_adeveloper
 
Oracle ADF Architecture TV - Development - Logging
Oracle ADF Architecture TV - Development - LoggingOracle ADF Architecture TV - Development - Logging
Oracle ADF Architecture TV - Development - Logging
Chris 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 Security
Chris 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 Presentation
Martin Thompson
 
Developer day v2
Developer day v2Developer day v2
Developer day v2
AiougVizagChapter
 
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
sparkfabrik
 
Meet up slides_mumbai_05022020_final
Meet up slides_mumbai_05022020_finalMeet up slides_mumbai_05022020_final
Meet up slides_mumbai_05022020_final
Akshata Sawant
 
L14 assigning access
L14 assigning accessL14 assigning access
L14 assigning access
Naresh Kumar SAHU
 
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.pdf
s1000dcodeandpixels
 
16613874-Object-Oriented-Programming-Presentation.ppt
16613874-Object-Oriented-Programming-Presentation.ppt16613874-Object-Oriented-Programming-Presentation.ppt
16613874-Object-Oriented-Programming-Presentation.ppt
vsdfg
 
D34010.pdf
D34010.pdfD34010.pdf
D34010.pdf
RuchiNagar3
 
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
Benjamin Cabé
 
Oracle+Software+Licensing+Basics_Sept24.pdf
Oracle+Software+Licensing+Basics_Sept24.pdfOracle+Software+Licensing+Basics_Sept24.pdf
Oracle+Software+Licensing+Basics_Sept24.pdf
riadelidrissi
 
Oracle 10g Forms Lesson 13
Oracle 10g Forms Lesson 13Oracle 10g Forms Lesson 13
Oracle 10g Forms Lesson 13
KAMA3
 
Oracle ADF Architecture TV - Development - Logging
Oracle ADF Architecture TV - Development - LoggingOracle ADF Architecture TV - Development - Logging
Oracle ADF Architecture TV - Development - Logging
Chris 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 Security
Chris 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 Presentation
Martin 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 cloud
sparkfabrik
 
Meet up slides_mumbai_05022020_final
Meet up slides_mumbai_05022020_finalMeet up slides_mumbai_05022020_final
Meet up slides_mumbai_05022020_final
Akshata 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.pdf
s1000dcodeandpixels
 
16613874-Object-Oriented-Programming-Presentation.ppt
16613874-Object-Oriented-Programming-Presentation.ppt16613874-Object-Oriented-Programming-Presentation.ppt
16613874-Object-Oriented-Programming-Presentation.ppt
vsdfg
 
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
Benjamin Cabé
 
Oracle+Software+Licensing+Basics_Sept24.pdf
Oracle+Software+Licensing+Basics_Sept24.pdfOracle+Software+Licensing+Basics_Sept24.pdf
Oracle+Software+Licensing+Basics_Sept24.pdf
riadelidrissi
 
Ad

Recently uploaded (20)

Linux Support for SMARC: How Toradex Empowers Embedded Developers
Linux Support for SMARC: How Toradex Empowers Embedded DevelopersLinux Support for SMARC: How Toradex Empowers Embedded Developers
Linux Support for SMARC: How Toradex Empowers Embedded Developers
Toradex
 
Build Your Own Copilot & Agents For Devs
Build Your Own Copilot & Agents For DevsBuild Your Own Copilot & Agents For Devs
Build Your Own Copilot & Agents For Devs
Brian McKeiver
 
Andrew Marnell: Transforming Business Strategy Through Data-Driven Insights
Andrew Marnell: Transforming Business Strategy Through Data-Driven InsightsAndrew Marnell: Transforming Business Strategy Through Data-Driven Insights
Andrew Marnell: Transforming Business Strategy Through Data-Driven Insights
Andrew Marnell
 
Role of Data Annotation Services in AI-Powered Manufacturing
Role of Data Annotation Services in AI-Powered ManufacturingRole of Data Annotation Services in AI-Powered Manufacturing
Role of Data Annotation Services in AI-Powered Manufacturing
Andrew Leo
 
Electronic_Mail_Attacks-1-35.pdf by xploit
Electronic_Mail_Attacks-1-35.pdf by xploitElectronic_Mail_Attacks-1-35.pdf by xploit
Electronic_Mail_Attacks-1-35.pdf by xploit
niftliyevhuseyn
 
Procurement Insights Cost To Value Guide.pptx
Procurement Insights Cost To Value Guide.pptxProcurement Insights Cost To Value Guide.pptx
Procurement Insights Cost To Value Guide.pptx
Jon Hansen
 
Massive Power Outage Hits Spain, Portugal, and France: Causes, Impact, and On...
Massive Power Outage Hits Spain, Portugal, and France: Causes, Impact, and On...Massive Power Outage Hits Spain, Portugal, and France: Causes, Impact, and On...
Massive Power Outage Hits Spain, Portugal, and France: Causes, Impact, and On...
Aqusag Technologies
 
Big Data Analytics Quick Research Guide by Arthur Morgan
Big Data Analytics Quick Research Guide by Arthur MorganBig Data Analytics Quick Research Guide by Arthur Morgan
Big Data Analytics Quick Research Guide by Arthur Morgan
Arthur Morgan
 
Semantic Cultivators : The Critical Future Role to Enable AI
Semantic Cultivators : The Critical Future Role to Enable AISemantic Cultivators : The Critical Future Role to Enable AI
Semantic Cultivators : The Critical Future Role to Enable AI
artmondano
 
Technology Trends in 2025: AI and Big Data Analytics
Technology Trends in 2025: AI and Big Data AnalyticsTechnology Trends in 2025: AI and Big Data Analytics
Technology Trends in 2025: AI and Big Data Analytics
InData Labs
 
tecnologias de las primeras civilizaciones.pdf
tecnologias de las primeras civilizaciones.pdftecnologias de las primeras civilizaciones.pdf
tecnologias de las primeras civilizaciones.pdf
fjgm517
 
Cybersecurity Identity and Access Solutions using Azure AD
Cybersecurity Identity and Access Solutions using Azure ADCybersecurity Identity and Access Solutions using Azure AD
Cybersecurity Identity and Access Solutions using Azure AD
VICTOR MAESTRE RAMIREZ
 
HCL Nomad Web – Best Practices und Verwaltung von Multiuser-Umgebungen
HCL Nomad Web – Best Practices und Verwaltung von Multiuser-UmgebungenHCL Nomad Web – Best Practices und Verwaltung von Multiuser-Umgebungen
HCL Nomad Web – Best Practices und Verwaltung von Multiuser-Umgebungen
panagenda
 
Dev Dives: Automate and orchestrate your processes with UiPath Maestro
Dev Dives: Automate and orchestrate your processes with UiPath MaestroDev Dives: Automate and orchestrate your processes with UiPath Maestro
Dev Dives: Automate and orchestrate your processes with UiPath Maestro
UiPathCommunity
 
DevOpsDays Atlanta 2025 - Building 10x Development Organizations.pptx
DevOpsDays Atlanta 2025 - Building 10x Development Organizations.pptxDevOpsDays Atlanta 2025 - Building 10x Development Organizations.pptx
DevOpsDays Atlanta 2025 - Building 10x Development Organizations.pptx
Justin Reock
 
Mobile App Development Company in Saudi Arabia
Mobile App Development Company in Saudi ArabiaMobile App Development Company in Saudi Arabia
Mobile App Development Company in Saudi Arabia
Steve Jonas
 
Greenhouse_Monitoring_Presentation.pptx.
Greenhouse_Monitoring_Presentation.pptx.Greenhouse_Monitoring_Presentation.pptx.
Greenhouse_Monitoring_Presentation.pptx.
hpbmnnxrvb
 
Transcript: #StandardsGoals for 2025: Standards & certification roundup - Tec...
Transcript: #StandardsGoals for 2025: Standards & certification roundup - Tec...Transcript: #StandardsGoals for 2025: Standards & certification roundup - Tec...
Transcript: #StandardsGoals for 2025: Standards & certification roundup - Tec...
BookNet Canada
 
AI EngineHost Review: Revolutionary USA Datacenter-Based Hosting with NVIDIA ...
AI EngineHost Review: Revolutionary USA Datacenter-Based Hosting with NVIDIA ...AI EngineHost Review: Revolutionary USA Datacenter-Based Hosting with NVIDIA ...
AI EngineHost Review: Revolutionary USA Datacenter-Based Hosting with NVIDIA ...
SOFTTECHHUB
 
Drupalcamp Finland – Measuring Front-end Energy Consumption
Drupalcamp Finland – Measuring Front-end Energy ConsumptionDrupalcamp Finland – Measuring Front-end Energy Consumption
Drupalcamp Finland – Measuring Front-end Energy Consumption
Exove
 
Linux Support for SMARC: How Toradex Empowers Embedded Developers
Linux Support for SMARC: How Toradex Empowers Embedded DevelopersLinux Support for SMARC: How Toradex Empowers Embedded Developers
Linux Support for SMARC: How Toradex Empowers Embedded Developers
Toradex
 
Build Your Own Copilot & Agents For Devs
Build Your Own Copilot & Agents For DevsBuild Your Own Copilot & Agents For Devs
Build Your Own Copilot & Agents For Devs
Brian McKeiver
 
Andrew Marnell: Transforming Business Strategy Through Data-Driven Insights
Andrew Marnell: Transforming Business Strategy Through Data-Driven InsightsAndrew Marnell: Transforming Business Strategy Through Data-Driven Insights
Andrew Marnell: Transforming Business Strategy Through Data-Driven Insights
Andrew Marnell
 
Role of Data Annotation Services in AI-Powered Manufacturing
Role of Data Annotation Services in AI-Powered ManufacturingRole of Data Annotation Services in AI-Powered Manufacturing
Role of Data Annotation Services in AI-Powered Manufacturing
Andrew Leo
 
Electronic_Mail_Attacks-1-35.pdf by xploit
Electronic_Mail_Attacks-1-35.pdf by xploitElectronic_Mail_Attacks-1-35.pdf by xploit
Electronic_Mail_Attacks-1-35.pdf by xploit
niftliyevhuseyn
 
Procurement Insights Cost To Value Guide.pptx
Procurement Insights Cost To Value Guide.pptxProcurement Insights Cost To Value Guide.pptx
Procurement Insights Cost To Value Guide.pptx
Jon Hansen
 
Massive Power Outage Hits Spain, Portugal, and France: Causes, Impact, and On...
Massive Power Outage Hits Spain, Portugal, and France: Causes, Impact, and On...Massive Power Outage Hits Spain, Portugal, and France: Causes, Impact, and On...
Massive Power Outage Hits Spain, Portugal, and France: Causes, Impact, and On...
Aqusag Technologies
 
Big Data Analytics Quick Research Guide by Arthur Morgan
Big Data Analytics Quick Research Guide by Arthur MorganBig Data Analytics Quick Research Guide by Arthur Morgan
Big Data Analytics Quick Research Guide by Arthur Morgan
Arthur Morgan
 
Semantic Cultivators : The Critical Future Role to Enable AI
Semantic Cultivators : The Critical Future Role to Enable AISemantic Cultivators : The Critical Future Role to Enable AI
Semantic Cultivators : The Critical Future Role to Enable AI
artmondano
 
Technology Trends in 2025: AI and Big Data Analytics
Technology Trends in 2025: AI and Big Data AnalyticsTechnology Trends in 2025: AI and Big Data Analytics
Technology Trends in 2025: AI and Big Data Analytics
InData Labs
 
tecnologias de las primeras civilizaciones.pdf
tecnologias de las primeras civilizaciones.pdftecnologias de las primeras civilizaciones.pdf
tecnologias de las primeras civilizaciones.pdf
fjgm517
 
Cybersecurity Identity and Access Solutions using Azure AD
Cybersecurity Identity and Access Solutions using Azure ADCybersecurity Identity and Access Solutions using Azure AD
Cybersecurity Identity and Access Solutions using Azure AD
VICTOR MAESTRE RAMIREZ
 
HCL Nomad Web – Best Practices und Verwaltung von Multiuser-Umgebungen
HCL Nomad Web – Best Practices und Verwaltung von Multiuser-UmgebungenHCL Nomad Web – Best Practices und Verwaltung von Multiuser-Umgebungen
HCL Nomad Web – Best Practices und Verwaltung von Multiuser-Umgebungen
panagenda
 
Dev Dives: Automate and orchestrate your processes with UiPath Maestro
Dev Dives: Automate and orchestrate your processes with UiPath MaestroDev Dives: Automate and orchestrate your processes with UiPath Maestro
Dev Dives: Automate and orchestrate your processes with UiPath Maestro
UiPathCommunity
 
DevOpsDays Atlanta 2025 - Building 10x Development Organizations.pptx
DevOpsDays Atlanta 2025 - Building 10x Development Organizations.pptxDevOpsDays Atlanta 2025 - Building 10x Development Organizations.pptx
DevOpsDays Atlanta 2025 - Building 10x Development Organizations.pptx
Justin Reock
 
Mobile App Development Company in Saudi Arabia
Mobile App Development Company in Saudi ArabiaMobile App Development Company in Saudi Arabia
Mobile App Development Company in Saudi Arabia
Steve Jonas
 
Greenhouse_Monitoring_Presentation.pptx.
Greenhouse_Monitoring_Presentation.pptx.Greenhouse_Monitoring_Presentation.pptx.
Greenhouse_Monitoring_Presentation.pptx.
hpbmnnxrvb
 
Transcript: #StandardsGoals for 2025: Standards & certification roundup - Tec...
Transcript: #StandardsGoals for 2025: Standards & certification roundup - Tec...Transcript: #StandardsGoals for 2025: Standards & certification roundup - Tec...
Transcript: #StandardsGoals for 2025: Standards & certification roundup - Tec...
BookNet Canada
 
AI EngineHost Review: Revolutionary USA Datacenter-Based Hosting with NVIDIA ...
AI EngineHost Review: Revolutionary USA Datacenter-Based Hosting with NVIDIA ...AI EngineHost Review: Revolutionary USA Datacenter-Based Hosting with NVIDIA ...
AI EngineHost Review: Revolutionary USA Datacenter-Based Hosting with NVIDIA ...
SOFTTECHHUB
 
Drupalcamp Finland – Measuring Front-end Energy Consumption
Drupalcamp Finland – Measuring Front-end Energy ConsumptionDrupalcamp Finland – Measuring Front-end Energy Consumption
Drupalcamp Finland – Measuring Front-end Energy Consumption
Exove
 

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

  • #3: 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.
  • #4: 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?
  • #6: Trigger Categories Triggers may be categorized based on their functions: You can also categorize triggers based on their names:
  • #7: 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
  • #8: 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.
  • #9: 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.
  • #10: 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.
  • #11: 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.
  • #12: 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.
  • #13: 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.
  • #14: 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.
  • #15: 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.