Suppose you want to handle an error in oracle forms and want to display custom error message for that error, but also you want to customize more for a particular error. For example there are many fields in form with required property is set to TRUE for Not Null check.

The example below shows the error handling in oracle forms with a specific Frm-40202 error.

On-Error Trigger
Trigger Level - Form

Declare
   error_item varchar2(50);
   curr_item_label varchar2(100);
Begin
   error_item := :system.trigger_item;
   if error_type = 'FRM' and error_code = 40202 then
      curr_item_label := get_item_property(error_item, prompt_text);
     --- you can use alert also to show the message 
      message(curr_item_label || ' cannot be left blank.');
   else
      message(error_text);
      --- visual attribute a_errors must exists or create your own 
      set_item_property(error_item, current_record_attribute, 'A_errors');
   end if; 
end; 

Like us to get notifications for free source code in future, thanks.

Writing On-Error Trigger In Oracle Forms的更多相关文章

  1. An Example of On-Error Trigger in Oracle Forms

    I wrote this trigger around 4 years ago to handle errors in an application based on Oracle Forms 6i. ...

  2. Using Post-Form Trigger In Oracle Forms

    Post-Form trigger in Oracle Forms fires during the Leave the Form process, when a form is exited.   ...

  3. Using Pre-Form Trigger In Oracle Forms

    Pre-Form trigger in Oracle Forms fires during the form start-up, before forms navigates to the first ...

  4. Define Custom Data Filter Using Pre-Query Trigger In Oracle Forms

    Oracle Forms is having its default records filter, which we can use through Enter Query mode to spec ...

  5. Learn How To Create Trigger In Oracle Forms

    I have written many posts related to triggers in Oracle Forms, I have given examples for Form Level ...

  6. Examples For When-Validate-Item trigger In Oracle Forms

    The following example finds the commission plan in the COMMPLAN table, based on the current value of ...

  7. Using Post_Query Trigger in Oracle Forms

    When a query is open in the block, the Post-Query trigger fires each time Form Builder fetches a rec ...

  8. How to Log Users Login and Logout Details Through Oracle Forms

    Log user's login and logout details in to table through Oracle Forms using POST-LOGON and PRE-LOGOUT ...

  9. Writing Text File From A Tabular Block In Oracle Forms

    The example given below for writing text file or CSV using Text_IO package from a tabular block in O ...

随机推荐

  1. 给debian安装xfce桌面套装

    首先要有一个debian的基本系统,然后: 1.sudo apt-get install xorg slim xfce4       #xdm   由于目前源里面最新的版本是4.3.99,想安装4.4 ...

  2. jQuery触发<a>标签的点击事件后URL不跳转的解决办法

    有HTML代码如下: <a id="workFrame" href="pages/work.html" target="FrameBox&quo ...

  3. 【转】SQL Server T-SQL高级查询

    SQL Server T-SQL高级查询 高级查询在数据库中用得是最频繁的,也是应用最广泛的. Ø 基本常用查询 --select select * from student; //查询student ...

  4. Qt可执行程序写入版本信息

    [1]新建Qt工程 1.1 具体新建步骤不赘述. 1.2 新建工程后文件目录如下: 1.3 留意对比一下你的代码目录,可以发现我的文件目录中多了一个rc类型的资源文件.那么,它也就是关键点. 1.4 ...

  5. LoadRunner并发用户和集合点的深入讨论

    看到51上三个高手Zee, 大漠飞鹰,xingcyx的一场非常精彩的关于并发用户数和集合点的讨论,很有意义.如果对这两个概念不清楚的朋友,一定要仔细领悟了. 故事开始于xingcyx的一番话: 声明: ...

  6. PHP面向对象的一些深入理解

    1.$this就是这个对象的地址,$this不能在类外部使用.2.构造函数 __construct 和析构函数都没有返回值:一旦一个对象成为垃圾对象(没有任何变量引用的对象,或者=null),析构函数 ...

  7. PHP给图片加文字(水印)

    准备工作: 代码: <?php header("Content-type: image/jpeg"); //浏览器输出,如不需要可去掉此行 $im = @imagecreat ...

  8. 七牛开发文档php

    http://developer.qiniu.com/docs/v6/sdk/php-sdk.html#overview http://developer.qiniu.com/docs/v6/sdk/ ...

  9. 通达OA 指纹考勤机接口 源代码

    通达oa2011已经支持 指纹考勤机  但只限中控iclock660 这款2000大洋的型号 通过本文的开发接口,可以与任意一款指纹机集成, 需求指纹机管理软件能实时保存数据 我这里用的是 中控u16 ...

  10. 事务的隔离级别及mysql对应操作

    /* 本次高并发解决之道 1,更改事务隔离级别为 read uncommitted读未提交 2,查询前设定延迟,延迟时间为随机 50-500 微秒 3,修改数据前将 超范围作为 限定修改条件 事务是作 ...