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. ionic入门之AngularJS扩展(一)

    ionic ionic是一个强大的混合式/hybridHTML5移动开发框架,特点是使用标准的HTML. CSS和JavaScript,开发跨平台(目前支持:Android.iOS,计划支持:Wind ...

  2. SSAS 聚合设计提升CUBE的查询性能(转载)

    Problem What exactly are SQL Server Analysis Services (SSAS) Aggregations and how exactly can I revi ...

  3. python 提取图片转为16 24BPP 的方法

    python 中处理图片用的是 pil ,在 linux  和 win 上都可以使用. centOS 5.x 上安装的方法是 yum install python-imaging 24BPP: imp ...

  4. 161020、web调试工具fiddler介绍及使用

    简介: Fiddler是一个http协议调试代理工具,它能够记录并检查所有你的电脑和互联网之间的http通讯,设置断点,查看所有的"进出"Fiddler的数据(指cookie,ht ...

  5. 160223、jquery中attr和prop的区别

    在高版本的jquery引入prop方法后,什么时候该用prop?什么时候用attr?它们两个之间有什么区别?这些问题就出现了. 关于它们两个的区别,网上的答案很多.这里谈谈我的心得,我的心得很简单: ...

  6. Mac下使用Automator实现隐藏和显示

    本文使用Makdown编辑 通常系统中打开一个文件有好多种方法,编辑也是.例如你要打开OmniGraffle来画个图(suppose you are working on the Mac OS X) ...

  7. 怎么使用 Laravel 的服务容器来优化读写数据库中的 options关键词

    其中我们可以最方便地利用的一个特性就是 Laravel 的服务容器了.在这里我不多赘述 Service Container 是个啥,想了解的可以自行搜索.不想了解的就只要大致知道它是个可以 绑定/取出 ...

  8. Java 如何快速序列化

    1,定义变量

  9. PostgreSQL连接python,postgresql在python 连接,创建表,创建表内容,插入操作,选择操作,更新操作,删除操作。

    安装 PostgreSQL可以用Python psycopg2模块集成. sycopg2是Python编程语言的PostgreSQL数据库的适配器. 其程序代码少,速度快,稳定.不需要单独安装这个模块 ...

  10. android -- 蓝牙 bluetooth (五)接电话与听音乐

    1.蓝牙耳机接听电话         这个就对应HFP(Hands-freeProfile),Free your Hand,蓝牙的初衷之一.先来看这个功能的场景,手机来电,手机与蓝牙耳机已连接,这时会 ...