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. php file_get_contents与curl性能比较

    1.fopen /file_get_contents 每次请求都会重新做DNS查询,并不对 DNS信息进行缓存.但是CURL会自动对DNS信息进行缓存.对同一域名下的网页或者图片的请求只需要一次DNS ...

  2. QTP常用功能

    1.QTP录制过程的截图 查看录制脚本过程中QTP的截图可以在QTP中查找,在关键字视图中点击每一步都对应一个截图   2.在关键字视图中为测试步骤添加注释 在关键字视图中表格列头中单击鼠标右键,选择 ...

  3. UINavigationController(转)

    UINavigationController是IOS编程中比较常用的一种容器view controller,很多系统的控件(如UIImagePickerViewController)以及很多有名的AP ...

  4. button改变背景与文字颜色

    1.定义/zhsh/res/color/txt_guide_selector.xml <?xml version="1.0" encoding="utf-8&quo ...

  5. yum安装mysql后没有mysqld

    在Centos中用命令 yum install mysql安装数据库,但装完后运行mysqld启动mysql的时候提示找不到,通过 find / | grep mysqld 也没找到mysqld的目录 ...

  6. scala构建类似java的pojo

    主要看以下代码: package com.test.scalaw.test.demo import scala.beans.BeanProperty /** * scala构建类似java 的pojo ...

  7. CentOS6.5系统软件仓库及挂载NTFS

    第一步:下载rpmforge,下载对应的版本,就是对应CentOS版本,还有32位与64位也要对应上.rpmforge拥有4000多种CentOS的软件包,被CentOS社区认为是最安全也是最稳定的一 ...

  8. Spring项目启动时执行初始化方法

    一.applicationContext.xml配置bean <bean id="sensitiveWordInitUtil" class ="com.hx.daz ...

  9. 进度条,随机数---demo笔记【原创】

    本人学习笔记,参考网上代码完成 makefile TEST_OBJ := rng_app MAKEOPT := ARCH=arm CROSS_COMPILE=arm-none-linux-gnueab ...

  10. Linux异步IO【转】

    转自:http://blog.chinaunix.net/uid-24567872-id-87676.html Linux® 中最常用的输入/输出(I/O)模型是同步 I/O.在这个模型中,当请求发出 ...