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版·ddelphi与halcon系列原创教程》Halcon的短板与delphi

    [<zw版·delphi与Halcon系列原创教程>Halcon的短板与delphi 看过<delphi与Halcon系列>blog的网友都知道,笔者对Halcon一直是非常推 ...

  2. 怎么开启PHP 的错误提示?

    怎么开启PHP 的错误提示?   在php.ini 修改error_reporting = E_ALL & ~E_NOTICEdisplay_errors = On重启apache服务器在运行 ...

  3. SQL Server 数据查询 整理

    一.使用SELECT检索数据 数据查询是SQL语言的中心内容,SELECT 语句的作用是让数据库服务器根据客户要求检索出所需要的信息资料,并按照规定的格式进行整理,返回给客户端. SELECT 语句的 ...

  4. TI CC2541的狗日的Key

    被突如其来的一个bug困扰了好几天, 起因是, 按键接的红外接收器, 结果发现, 一旦按下之后, IEN1, P0IE的标识位bit5, 被不知道特么的谁归0了, 也就是说, 按键只能被按下一次, 再 ...

  5. JavaEE基础(十三)

    1.常见对象(StringBuffer类的概述) A:StringBuffer类概述 通过JDK提供的API,查看StringBuffer类的说明 线程安全的可变字符序列 B:StringBuffer ...

  6. Java 如何快速序列化

    1,定义变量

  7. [团队项目]SCRUM项目5.0

    5.0--------------------------------------------------- 1.团队成员完成自己认领的任务. 2.燃尽图:理解.设计并画出本次Sprint的燃尽图的理 ...

  8. linux命令总结2

    昨天继续对239进行挖掘,想把运营登录浮层的示例页面放在这台测试机上,供大家使用,结果在配置apache时出现了问题,无论怎样,页面都是403 Forbidden,最后终于被露颖同学经过2个小时的努力 ...

  9. csdn在线编程里面的一个排列组合题

    是csdn在线编程里面的一个问题 回文字符串是指从左到右和从右到左相同的字符串,现给定一个仅由小写字母组成的字符串,你可以把它的字母重新排列,以形成不同的回文字符串. 输入:非空仅由小写字母组成的字符 ...

  10. 2015-11-04 报表 (asp.net 部分)

    <%@ Page Language="C#" AutoEventWireup="true" CodeFile="Scrap_p.aspx.cs& ...