Copyright Ó Oracle Corporation, 1999. All rights reserved. 1818 Validation.

Slides:



Advertisements
Similar presentations
Copyright Ó Oracle Corporation, All rights reserved Sharing Objects and Code.
Advertisements

Guide to Oracle10G1 Introduction To Forms Builder Chapter 5.
13 Copyright © 2004, Oracle. All rights reserved. Introduction to Triggers.
6 Copyright © 2004, Oracle. All rights reserved. Working with Data Blocks and Frames.
A Guide to Oracle9i1 Introduction To Forms Builder Chapter 5.
7 Copyright © 2004, Oracle. All rights reserved. Working with Text Items.
10 Copyright © 2004, Oracle. All rights reserved. Creating Noninput Items.
9 Copyright © 2004, Oracle. All rights reserved. Creating Additional Input Items.
8 Copyright © 2004, Oracle. All rights reserved. Creating LOVs and Editors.
4 Copyright © 2004, Oracle. All rights reserved. Creating a Basic Form Module.
Chapter 5B-C: Introduction to Forms Builder: Tiggers, LOV.
3 Copyright © 2004, Oracle. All rights reserved. Working in the Forms Developer Environment.
Eyad Alshareef 1 Creating Custom Forms Part B. 2Eyad Alshareef Lesson B Objectives After completing this lesson, you should be able to: Suppress default.
5 Copyright © 2004, Oracle. All rights reserved. Creating a Master-Detail Form.
14 Copyright © 2004, Oracle. All rights reserved. Producing Triggers.
5 Copyright © 2009, Oracle. All rights reserved. Defining ETL Mappings for Staging Data.
23 Copyright © 2004, Oracle. All rights reserved. Sharing Objects and Code.
20 Copyright © 2004, Oracle. All rights reserved. Database Recovery.
13 Copyright © Oracle Corporation, All rights reserved. RMAN Complete Recovery.
8 Copyright © 2004, Oracle. All rights reserved. Creating LOVs and Editors.
Copyright Ó Oracle Corporation, All rights reserved. 55 Working with Data Blocks and Frames.
6 Copyright © 2004, Oracle. All rights reserved. Working with Data Blocks and Frames.
6 Copyright © 2004, Oracle. All rights reserved. Working with Data Blocks and Frames.
Copyright © 2007, Oracle. All rights reserved. Managing Concurrent Requests.
2 Copyright © 2007, Oracle. All rights reserved. Navigating in R12 Oracle Applications.
15 Copyright © 2007, Oracle. All rights reserved. Performing Database Backups.
Copyright Ó Oracle Corporation, All rights reserved. 22 Running a Form Builder Application.
1 Copyright © 2004, Oracle. All rights reserved. Introduction to PL/SQL.
5 Copyright © 2004, Oracle. All rights reserved. Creating a Master-Detail Form.
5 Copyright © 2004, Oracle. All rights reserved. Creating a Master-Detail Form.
1 Copyright © 2004, Oracle. All rights reserved. Introduction to PL/SQL.
Copyright Ó Oracle Corporation, All rights reserved Producing Triggers.
10 Copyright © 2004, Oracle. All rights reserved. Creating Noninput Items.
Copyright Ó Oracle Corporation, All rights reserved. 99 Creating Noninput Items.
Order Entry Program Please see speaker notes for additional information!
Copyright Ó Oracle Corporation, All rights reserved Working with Other Canvases.
3 Copyright © 2004, Oracle. All rights reserved. Working in the Forms Developer Environment.
16 Copyright © 2004, Oracle. All rights reserved. Adding Functionality to Items.
Copyright Ó Oracle Corporation, All rights reserved Query Triggers.
INTRODUCTION TO DATABASE USING MICROSOFT ACCESS 2013 Part 5.2 November 16, 2014.
13 Copyright © Oracle Corporation, All rights reserved. Maintaining Data Integrity.
10 Copyright © Oracle Corporation, All rights reserved. User-Managed Backups.
19 Copyright © 2004, Oracle. All rights reserved. Validation.
CHAPTER 6 LESSON B Creating Custom Forms. Lesson B Objectives  Suppress default system messages  Create alerts and messages to provide system feedback.
4 Copyright © 2004, Oracle. All rights reserved. Creating a Basic Form Module.
25 Copyright © 2004, Oracle. All rights reserved. Introducing Multiple Form Applications.
Copyright Ó Oracle Corporation, All rights reserved Writing Flexible Code.
6 Copyright © 2004, Oracle. All rights reserved. Adding Custom Validation.
16 Copyright © 2005, Oracle. All rights reserved. Performing Database Recovery.
3 Copyright © 2007, Oracle. All rights reserved. Using the RMAN Recovery Catalog.
21 Copyright © 2009, Oracle. All rights reserved. Working with Oracle Business Intelligence Answers.
Chapter 5 Introduction To Form Builder. Lesson C Objectives  Use sequences to automatically generate primary key values in a form  Create lists of values.
Copyright Ó Oracle Corporation, All rights reserved Debugging Triggers.
29 Copyright © 2009, Oracle. All rights reserved. Administering the Oracle Business Intelligence Presentation Catalog.
Lesson 22: Printing Labels SKU and Storage Location.
Copyright Ó Oracle Corporation, All rights reserved. 77 Creating LOVs and Editors.
5 Copyright © 2008, Oracle. All rights reserved. Testing and Validating a Repository.
2 Copyright © 2004, Oracle. All rights reserved. Running a Forms Developer Application.
8 Copyright © 2005, Oracle. All rights reserved. Managing Schema Objects.
Copyright Ó Oracle Corporation, All rights reserved. 88 Creating Additional Input Items.
16 Copyright © 2004, Oracle. All rights reserved. Testing the Migrated Oracle Database.
9 Copyright © 2004, Oracle. All rights reserved. Getting Started with Oracle Migration Workbench.
Running a Forms Developer Application
Forms Concepts Triggers Fired when Internal/External events occur
Working with Data Blocks and Frames
Appendix – Integration with Assets, Locations, and Organizations
Introduction to Triggers
Creating Noninput Items
Creating Additional Input Items
Navigation Schedule: Timing Topic 45 minutes Lecture
Presentation transcript:

Copyright Ó Oracle Corporation, All rights reserved Validation

18-2 Copyright Ó Oracle Corporation, All rights reserved. Objectives After completing this lesson, you should be able to do the following: Explain the effects of the validation unit upon a form List Form Builder validation properties Control validation by using triggers After completing this lesson, you should be able to do the following: Explain the effects of the validation unit upon a form List Form Builder validation properties Control validation by using triggers

18-3 Copyright Ó Oracle Corporation, All rights reserved. Validation Form Builder validates at the following levels: Form level Block level Record level Item level

18-4 Copyright Ó Oracle Corporation, All rights reserved. Validation Validation occurs when: –[Enter] key or ENTER Built-in is obeyed –Operator or trigger leaves the validation unit (includes a Commit) Validation occurs when: –[Enter] key or ENTER Built-in is obeyed –Operator or trigger leaves the validation unit (includes a Commit)

18-5 Copyright Ó Oracle Corporation, All rights reserved. Validation Unit Property

18-6 Copyright Ó Oracle Corporation, All rights reserved. LOV for Validation LOV TERRY Full list MART Partial list WARDValid Autocomplete AL ALAN HDATE FEB FEB MAR FEB SEP-81 ENAME MARTIN MARTINEZ SEDAT WARD ALAN

18-7 Copyright Ó Oracle Corporation, All rights reserved. Validation Triggers IF :S_ORD.date_shipped < :S_ORD.date_ordered THEN MESSAGE( ’ Ship Date is before Order Date! ’ ); RAISE form_trigger_failure; END IF; IF :S_ORD.date_shipped < :S_ORD.date_ordered THEN MESSAGE( ’ Ship Date is before Order Date! ’ ); RAISE form_trigger_failure; END IF; Item level When-Validate-Item Block level When-Validate-Record Item level When-Validate-Item Block level When-Validate-Record

18-8 Copyright Ó Oracle Corporation, All rights reserved. Validating User Input Trigger failure? W-V-I Customer ID 998 SELECT... WHERE id = :S_ORD.customer_id SELECT... WHERE id = :S_ORD.customer_id

18-9 Copyright Ó Oracle Corporation, All rights reserved. Tracking Validation Status NEW –When a record is created –Also for Copy Value from Item or Initial Value CHANGED –When changed by user or trigger –When any item in new record is changed NEW –When a record is created –Also for Copy Value from Item or Initial Value CHANGED –When changed by user or trigger –When any item in new record is changed

18-10 Copyright Ó Oracle Corporation, All rights reserved. Tracking Validation Status VALID –When validation has been successful –After records are fetched from database –After a successful post or commit –Duplicated record inherits status of source VALID –When validation has been successful –After records are fetched from database –After a successful post or commit –Duplicated record inherits status of source

18-11 Copyright Ó Oracle Corporation, All rights reserved. Built-ins for Validation CLEAR_BLOCK, CLEAR_ FORM, EXIT_FORM ENTER SET_FORM_PROPERTY –(..., VALIDATION) –(..., VALIDATION_UNIT) ITEM_IS_VALID item property VALIDATE (VALIDATION_ UNIT) CLEAR_BLOCK, CLEAR_ FORM, EXIT_FORM ENTER SET_FORM_PROPERTY –(..., VALIDATION) –(..., VALIDATION_UNIT) ITEM_IS_VALID item property VALIDATE (VALIDATION_ UNIT)

18-12 Copyright Ó Oracle Corporation, All rights reserved. Summary Validation occurs at item, record, block, and form levels. Validation happens when: –[Enter] Key or ENTER built-in is activated –Control leaves the validation unit due to navigation or commit Validation occurs at item, record, block, and form levels. Validation happens when: –[Enter] Key or ENTER built-in is activated –Control leaves the validation unit due to navigation or commit

18-13 Copyright Ó Oracle Corporation, All rights reserved. Summary Standard validation occurs before trigger validation. Default validation unit is item level. Validation status –NEW –CHANGED –VALID When-Validate-“object” triggers to supplement validation. Standard validation occurs before trigger validation. Default validation unit is item level. Validation status –NEW –CHANGED –VALID When-Validate-“object” triggers to supplement validation.

18-14 Copyright Ó Oracle Corporation, All rights reserved. Practice 18 Overview This practice covers the following topics: Validating the Sales Representative item value using a LOV Writing a validation trigger to check that the shipped date is not before the ordered date Populating customer names, sales representative names, and IDs when a customer ID is changed Writing a validation trigger to populate the name and the price of the product when the product ID is changed This practice covers the following topics: Validating the Sales Representative item value using a LOV Writing a validation trigger to check that the shipped date is not before the ordered date Populating customer names, sales representative names, and IDs when a customer ID is changed Writing a validation trigger to populate the name and the price of the product when the product ID is changed