Oracle
  Home arrow Oracle arrow Page 4 - Adding Computations, Processes, and Va...
Dev Shed Forums 
Administration  
Apache  
BrainDump  
DHTML  
Flash  
Java  
JavaScript  
Multimedia  
MySQL  
Oracle  
Perl  
PHP  
Practices  
Python  
Reviews  
Security  
Style-Sheets  
Web Services  
XML  
Zend  
Zope  
Forums Sitemap 
IBM® developerWorks 
Dedicated Servers 
E-Commerce Hosting 
Linux Web Hosting 
Managed Hosting 
Small Business Hosting 
Download TestComplete 
VPS Hosting 
Weekly Newsletter

 
Developer Updates  
Free Website Content 
IBM Rational Software Development Conference
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid 
Request Media Kit
Contact Us 
Site Map 
Privacy Policy 
Support 
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
ORACLE

Adding Computations, Processes, and Validations
By: McGraw-Hill/Osborne
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 5 stars5 stars5 stars5 stars5 stars / 2
    2007-04-19

    Table of Contents:
  • Adding Computations, Processes, and Validations
  • Creating Validations
  • Computations
  • Creating Computations

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      Del.ici.ous Digg
      Blink Simpy
      Google Spurl
      Y! MyWeb Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article
     
     
     
    ADVERTISEMENT

    Stay one step ahead of the competition. Evaluate and give feedback on some of the hottest web development tools on the market today. Make your opinion heard! Click Here

    Adding Computations, Processes, and Validations - Creating Computations
    (Page 4 of 4 )

    Computations are created in two places. Application-level computations are created from the Application Computations link in the Logic section of the application’s shared components. When creating an application-level computation, you are taken directly to the Edit Application Computation page. Page-level computations are created from the Add icon in either the Computation section at the bottom of the Page Rendering column or the Computation section at the top of the Page Processing column. Both of these will start the computation-creation wizard. This wizard can also be started through the Create link on the Developer’s Toolbar and selecting the Page Control on This Page option.

    The first step in the process is to select whether you want to calculate the value for an item on the same page, an item on another page, or an application-level item. Next, you select the item on which you want to create the computation from a pick list based on your first selection. You also specify the sequence for the computation. If there are multiple computations at the same processing point, they will be processed in the order of the sequence number. You also specify the computation point and the type of computation.

    The six different types of computations offer the developer great flexibility in how the value of an item may be determined. Each type, along with an example, is shown in the following table.

    Computation Type

    Example

    Static Assignment

    5 or completed

    PL/SQL Function Body

    This is a simple example but it can be as complex as any function you would otherwise write including a declaration section.

    if instr(upper(:p5_lastname),'DAN')>0 then 
      return :p5_notes||' it''s a Dan';
    else

      return :p5_notes;
    end if;

    SQL Query

    select code_value
      from code_table
    where code = :p45_user_value;
     

    SQL Expression

    substr(:p5_name, instr(:p5_name, ',') + 1 )

    PL/SQL Expression

    nvl(:p5_country, ‘Unknown’)

    Item Value

    p5_other_field

    The last step in the wizard allows you to specify a condition that must be met before the computation will be executed. All the normal 60-plus condition types are available.

    Editing Computations

    To edit a page-level computation, click on the name of the computation to navigate to the Edit Page Computation page. In addition to the attributes entered in the wizard, you can specify an error message in case the computation fails. Additionally, the normal sections for Authentication, Configuration, and Comments are available.

    When you click on the title of the Computations section, you will navigate to the Page Computations page, where you can edit the sequence and computation point of all your computations. You can also see the computation type, whether it is conditional, and when it was last updated.

    To edit application-level computations, navigate to the specific computation through the Application Computations link in the Logic section of the application’s shared components.

    Please check back next week for the continuation of this article.


    DISCLAIMER: The content provided in this article is not warranted or guaranteed by Developer Shed, Inc. The content provided is intended for entertainment and/or educational purposes in order to introduce to the reader key ideas, concepts, and/or product reviews. As such it is incumbent upon the reader to employ real-world tactics for security and implementation of best practices. We are not liable for any negative consequences that may result from implementing any information covered in our articles or tutorials. If this is a hardware review, it is not recommended to open and/or modify your hardware.

       · This article is an excerpt from the "Oracle HTML DB Handbook," published by...
     

    Buy this book now. This article is excerpted from chapter 13 of the Oracle HTML DB Handbook, written by Lawrence Linnemeyer and Bradley Brown (McGraw-Hill, 2006; ISBN: 0072257687). Check it out today at your favorite bookstore. Buy this book now.

       

    ORACLE ARTICLES

    - Tuning PL/SQL Code
    - Debugging PL/SQL Code
    - Testing PL/SQL Code
    - Working With PL/SQL Code
    - Conditional Compilation for Oracle Database ...
    - Compile-Time Warnings for Oracle DB 10g
    - Compiling PL/SQL Code for an Oracle Database
    - Troubleshooting PL/SQL Code
    - Managing PL/SQL Code
    - Data Manipulation and More for HTML DB Appli...
    - Oracle Database Fundamentals
    - Adding Processes to HTML DB Applications
    - Adding Computations, Processes, and Validati...
    - Sub-templates and More with Oracle HTML DB
    - Focusing on Templates in Oracle HTML DB

     
    Accelerating Trading Partner Performance
     
    Competing on Analytics
     
    Cost Effective Scaling with Virtualization and Coyote Point Systems
     
    Five Checkpoints to Implementing IP Telephony
     
    Hosted Email Security: Staying Ahead of New Threats
     




    © 2003-2008 by Developer Shed. All rights reserved. DS Cluster 3 hosted by Hostway