Example is given below to validate a Text Item in Oracle Forms with specific rules condition which can be define at run time with the use of T-List item and When-Validate-Item trigger.
 
Below is the screen shot of this example form which can be download free from Google Drive with the following link: Validate.fmb
 
 
The following trigger is written in the When Validate Item trigger:
 
if :rules = 'Must Not Be Blank' then
 if nvl(:wvi,'-_-') = '-_-' then
     bell;
     Message(:rules);
     raise form_trigger_failure;
 end if;
elsif :rules = 'Can Be Blank But Can Not Have Numeric Value' then
   if length(replace(translate(:wvi, '0123456789', '          '), ' ')) < length(:wvi) then
      bell;
      Message(:rules);
       raise form_trigger_failure;
   end if;
elsif :rules = 'Must Contain @' then
     if not instr(:wvi, '@') > 0 then
        bell;
        Message(:rules);
         raise form_trigger_failure;
     end if;
elsif :rules = 'Must Contain Date Only' then
declare
d date;
Begin
  d := to_date(:wvi, 'DD-MM-YYYY');
exception
when others then
   bell;
   Message(:rules);
   raise form_trigger_failure;
end;
end if;

An Example Of Validating Text Item In Oracle Forms Using When-Validate-Item Trigger的更多相关文章

  1. Determining Current Block and Current Item in Oracle Forms

    SYSTEM.CURSOR_BLOCK Determining current block in Oracle Forms Using SYSTEM.CURSOR_BLOCK system varia ...

  2. Highlighting Text Item On Entry In Oracle Forms

    Highlight a Text Item in Oracle Forms With Visual Attribute It is very necessary to highlight the cu ...

  3. Writing Text Files On The Client in Oracle Forms 10g

    Below is the example to write file on client in Oracle Forms 10g with webutil library package.Note:  ...

  4. Shifting List Item Values From One List To Another In Oracle Forms

    Suppose you have two T-List items in form and you want  to shift element values from one list to ano ...

  5. Populate A List Item With Record Group In Oracle Forms Using Populate_List And Create_Group_From_Query Command

    Example is given below to Populate a List Item in Oracle Forms using Create_Group_From_Query , Popul ...

  6. Adding Value To Combo List at Runtime in Oracle Forms

    You want to add a value in Combo List item in Oracle Forms, by typing it in combo list box text area ...

  7. Perform Cut Copy Paste Operations Using Cut_Region Copy_Region Paste_Region Commands In Oracle Forms

    You can do Select, Cut, Copy and Paste operations on text items in Oracle Forms using Select_All, Cu ...

  8. 8 Most Required Examples Reference For Oracle Forms

    Check the following 8 Links for best Oracle Forms examples with source code (Fmb files), which will ...

  9. Set Font Properties On Mouse Hover Of Push Button And Text Items At Run time In Oracle Forms

    Change the font size and weight of text items and push buttons on mouse hover in Oracle Forms.   An ...

随机推荐

  1. 《zw版·Halcon-delphi系列原创教程》航母舰载机·视觉定位标志的识别代码

    <zw版·Halcon-delphi系列原创教程>航母舰载机·视觉定位标志的识别代码 航母舰载机机身上的黄黑圆圈的标志是什么意思,辐射?核动力?战术核弹? <百度百科>介绍如下 ...

  2. 对Alexia(minmin)网友代码的评论及对“求比指定数大且最小的‘不重复数’问题”代码的改进

    应Alexia(minmin)网友之邀,到她的博客上看了一下她的关于“求比指定数大且最小的‘不重复数’问题”的代码(百度2014研发类校园招聘笔试题解答),并在评论中粗略地发表了点意见. 由于感觉有些 ...

  3. Windows系统文件受损的修复技巧

    Windows2000/XP系统文件受损的修复技巧 意外重启.安装了不兼容的软件.恶意程序侵扰.误删文件……有太多种可能性会使我们的系统文件受损,而系统文件受损后最直接的表现就是系统不稳定.经常出现错 ...

  4. js编写规范

    JavaScript编码规范 Bug----33条 1. 不要使用’==’和’!=’,使用’===’和’!==’替代 等级:Major 原因:==和!=在判断值相等前会判断类型是否相等.这容易因为类型 ...

  5. [置顶] lua 进阶3--lua文件中调用C++函数

    前面讲了一下,C++读取lua文件中的变量,包括一维表.二维表这些,这节讲一下如何在lua文件中去调用C++函数 C++代码如下 #include <stdio.h> extern &qu ...

  6. vsftpd基本配置(原)

    前提:iptables关闭或放行,selinux关闭或放行. 目标:创建虚拟ftpuser到指定的www.ftpuser.com目录,且只能在本目录下. 创建帐号 useradd -d /var/ww ...

  7. asp显示多条记录的代码

    asp显示多条记录的代码 仅供参考 <%for i=1 to RS.PageSize%> <% if RS.EOF then exit for end if %> <tr ...

  8. Mac OX 隐藏文件夹,文件,应用,磁盘的2种方法 hide finder folder, file, application, volume in 2 ways

    经常需要主目录下隐藏一些文件夹之类的, 第一想到的当然就是:在要隐藏的文件夹前面加『.』(leading dot),这个用法当然可以的了 用习惯了Linux/GNU系统的,基本习惯使用这种办法 但是, ...

  9. java面试每日一题12

    题目:打印出如下图案(菱形)     *    ***  ****** ********  ******   ***    * public class Diamond { public static ...

  10. 每日一九度之 题目1031:xxx定律

    时间限制:1 秒 内存限制:32 兆 特殊判题:否 提交:6870 解决:4302 题目描述:     对于一个数n,如果是偶数,就把n砍掉一半:如果是奇数,把n变成 3*n+ 1后砍掉一半,直到该数 ...