Suppose you want to give an option to user to select only 5 check boxes from given any number of check boxes in an Oracle Form and if user selects more than 5 than give a message that you can not select more than 5.

For this follow these steps:

Create 10 check boxes in block with name like checkbox1, checkbox2, checkbox3 and so on.

Then write the When-Checkbox-Changed trigger at block level and put the following code in it:

declare
nlabel number := 1;
total_checked number := 0;
begin
 while nlabel <= 10 loop
     if checkbox_checked('block3.CHECKBOX'||nlabel) then
       total_checked := total_checked + 1;
       if total_checked > 5 then
          message('more than 5 selected.');
          copy('N', :System.Cursor_Item);
          exit;
       end if;
     end if;
     nlabel := nlabel + 1;
 end loop;
 raise form_trigger_failure;
end;

Limiting To Select Only 5 Check Boxes Out Of Ten In Oracle Forms的更多相关文章

  1. [label][翻译][JavaScript]如何使用JavaScript操纵radio和check boxes

    Radio 和 check boxes是form表单中的一部分,允许用户通过鼠标简单点击就可以选择.当与<textarea>元素的一般JavaScript操纵相比较,这些表单控件(form ...

  2. [XAF] How to represent an enumeration property via a drop-down box with check boxes

    https://www.devexpress.com/Support/Center/Example/Details/E689

  3. Know How To Use Check Box Mapping Of Other Values Property In Oracle Forms

    Check Box Mapping of Other Values specifies how any fetched or assigned value that is not one of the ...

  4. Working with Data » Getting started with ASP.NET Core and Entity Framework Core using Visual Studio » 更新关系数据

    Updating related data¶ 7 of 7 people found this helpful The Contoso University sample web applicatio ...

  5. 在Windows中使用MinGW编译X264

    转自:http://www.cnblogs.com/xiongjiaji/archive/2012/06/08/2541265.html 参考:http://ayobamiadewole.com/Bl ...

  6. build-your-first-mobile-app(第一个 PhoneGap cordova Coldfusion App)

    摘自:http://www.adobe.com/devnet/coldfusion/articles/build-your-first-mobile-app.html Introduction Use ...

  7. How to Baskup and Restore a MySQL database

    If you're storing anything in MySQL databases that you do not want to lose, it is very important to ...

  8. Check Box Select/Deselect All on Grid

    The below function is to be used on a grid with multiple check boxes. Place the code behind a FieldC ...

  9. Nonblocking I/O and select()

    This sample program illustrates a server application that uses nonblocking and the select() API. Soc ...

随机推荐

  1. mysql创建视图

    CREATE ALGORI`sync_user`CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER V ...

  2. servlet、genericservlet、httpservlet之间的区别(转)

    当编写一个servlet时,必须直接或间接实现servlet接口,最可能实现的方法就是扩展javax.servlet.genericservlet或javax.servlet.http.httpser ...

  3. OpenStack 新加计算节点后修改

    Contents [hide] 1 前提 2 iptables禁止snat= 3 vlan支持 4 Quota支持 5 修改物理资源设置. 6 添加collectd 7 重启服务 前提 我们使用fue ...

  4. mybatis 复习笔记03

    参考:http://www.mybatis.org/mybatis-3/zh/configuration.html 入门 1. 从 XML 中构建 SqlSessionFactory 每个基于 MyB ...

  5. Delphi 线程同步技术(转)

    上次跟大家分享了线程的标准代码,其实在线程的使用中最重要的是线程的同步问题,如果你在使用线程后,发现你的界面经常被卡死,或者无法显示出来,显示混乱,你的使用的变量值老是不按预想的变化,结果往往出乎意料 ...

  6. WINCE 隐藏标题栏

    转自:https://social.msdn.microsoft.com/Forums/en-US/cef1c20a-25cf-49b6-a56e-6bc733be88f8/removing-the- ...

  7. 转载WPF SDK研究 之 AppModel

    Jianqiang's Mobile Dev Blog iOS.Android.WP CnBlogs Home New Post Contact Admin Rss Posts - 528 Artic ...

  8. JAVA基础知识之网络编程——-基于AIO的异步Socket通信

    异步IO 下面摘子李刚的<疯狂JAVA讲义> 按照POSIX标准来划分IO,分为同步IO和异步IO.对于IO操作分为两步,1)程序发出IO请求. 2)完成实际的IO操作. 阻塞IO和非阻塞 ...

  9. Tomcat优化总结

    一.内存溢出问题 Linux设置启动脚本 [root@LAMP ~]# vi /usr/local/tomcat/bin/catalina.sh #__________________________ ...

  10. apache-common pool的使用

    Apache commons-pool本质上是"对象池",即通过一定的规则来维护对象集合的容器;commos-pool在很多场景中,用来实现"连接池"/&quo ...