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. 【海岛帝国系列赛】No.4 海岛帝国:LYF的太空运输站

    50212228海岛帝国:LYF的太空运输站 [试题描述] 最近,“购物券”WHT在“药师傅”帝国资源大会上提出了“SSTS”太空运输站计划.由于恐怖分子前些日子刚猖狂完,炸毁高楼无数,YSF不得不执 ...

  2. NOIP200505谁拿了最多的奖学金

    NOIP200505谁拿了最多的奖学金 Description 某校的惯例是在每学期的期末考试之后发放奖学金.发放的奖学金共有五种,获取的条件各自不同: 1)      院士奖学金,每人8000元,期 ...

  3. android 应用架构随笔四(View、ViewGroup)

    View表示了用户界面的基本构建模块. 一个View占用了屏幕上的一个矩形区域并且负责界面绘制和事件处理.手机屏幕上所有看得见摸得着的都是View. Activity是四大组件中唯一一个用来和用户进行 ...

  4. 161125、Java网络编程之统一资源定位符URL

    统一资源定位符URL(Uniform Resource Locator)是www客户机访问Internet时用来标识资源的名字和地址.超文本链路由统一资源定位符URL维持.URL的格式是: <M ...

  5. sql回滚

    rollback是针对事务的,你如果没有在执行语句之前开启事务,那么无法rollback,建议你还是想别的办法吧,事务语句如下(sqlserver的给你借鉴):--开启事务begin tran --执 ...

  6. 正则表达式用户名密码电话身份证Email使用

    月末了,这个月才写了2遍文章,对自己略感失望了,最近是有些忙,等闲些日子后,再整理一些文章分享给大家! 这遍是关于正则表达式,因为写项目时要用到正则表达式,所以就学习了下,另写一遍文章,方便记忆! 1 ...

  7. C#:实现托盘(任务栏图标与托盘图标互斥)

    实现托盘(任务栏图标与托盘图标互斥),并且在点击任务栏图标时实现的最小化与点击最小化按钮分离. 具体如下: 1.向窗体上添加如下控件:MenuStrip menuStrip1, NotifyIcon ...

  8. php socket函数详解

    最近在用socket实现服务端向客户端主动推送消息 函数名 描述 socket_accept() 接受一个Socket连接 socket_bind() 把socket绑定在一个IP地址和端口上 soc ...

  9. python基础使用

    Python 标识符 在python里,标识符有字母.数字.下划线组成. 在python中,所有标识符可以包括英文.数字以及下划线(_),但不能以数字开头. python中的标识符是区分大小写的. 以 ...

  10. c# 之五行地支

    using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; usin ...