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. 使用php模拟post的几种方法

    <?phpfunction file_get_contents_post($url,$post){$options=array('http'=>array('method'=>'PO ...

  2. 开启xp_cmdshell

    --打开xp_cmdshell EXEC sp_configure 'show advanced options', 1GORECONFIGUREGOEXEC sp_configure 'xp_cmd ...

  3. CentOS7.1搭建服务器篇(1)

    服务器搭建篇 1.镜像选择,CentOS 7.1 minmal.iso 2.yum install net-tools[提供ifconfig工具,我不习惯IP命令] 3.配置静态IP地址58.154. ...

  4. 【ruby】ruby基础知识

    Install Ruby(安装) For windows you can download Ruby from http://rubyforge.org/frs/?group_id=167 for L ...

  5. yii2添加自定义字段

    在模型model文件中,添加 public $attributes;即可,$attributes 为要添加的新字段

  6. UINavigationController详解三(转)ToolBar

    原文出自:http://blog.csdn.net/totogo2010/article/details/7682641,特别感谢. 1.显示Toolbar  在RootViewController. ...

  7. IE11无法支持Forms认证,,,也就是无法保存COOKIE

    <authentication mode="Forms"> <forms name="xxxx" loginUrl="login.a ...

  8. weblogic安装失败

    weblogic无法安装所选应用程序 Exception in AppMerge flows' progression Exception in AppMerge flows' progression ...

  9. Oracle存储过程单步调试方法

    oracle存储过程单步调试的方法 1.在要调试的过程上单击test,如下图所示: 2.出现如下界面时单击最左上方的按钮:,如下图所示: 3.单击后呈现如下画面: 其中: 表示要停止test; 表示要 ...

  10. git 检出

    1 git checkout branch 检出branch分支.要完成图8-1三个步骤,更新HEAD已指向新分支 以及用branch指向的树更新暂存区和工作区 2 git checkout 显示出工 ...