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. 五、Java基础---------if else、switch总结

    在前几篇博客中主要是以笔者遇到的一些典型的题目为例子而展开的讨论,接下来几篇将是以知识点的结构进行讲述.本文主要是讲述if ()else .if() else if().switch() case 的 ...

  2. C语言初学者代码中的常见错误与瑕疵(1)

    曾在豆瓣上看到过一个小朋友贴出他自己的代码(http://www.douban.com/group/topic/40293109/),当时随口指点了几句.难得这位小朋友虚心修正.从善如流,不断地改,又 ...

  3. Unexpected error: UnicodeDecodeError: 'ascii' codec can't decode byte 0xd2 in position 69: ordinal not in range(128)-解决办法

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

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

  5. bodybuilding

    增大肌肉块的14大秘诀:大重量.低次数.多组数.长位移.慢速度.高密度.念动一致.顶峰收缩.持续紧张.组间放松.多练大肌群.训练后进食蛋白质.休息48小时.宁轻勿假. 1. 大重量.低次数:健美理论中 ...

  6. org.apache.cxf.transport.servlet.CXFServlet cannot be cast to javax.servlet.Servlet

    java.lang.ClassCastException: org.apache.cxf.transport.servlet.CXFServlet cannot be cast to javax.se ...

  7. [ Laravel 5.3 文档 ] 安全 ―― API认证(Passport)保障安全性。

    1.简介 Laravel通过传统的登录表单已经让用户认证变得很简单,但是API怎么办?API通常使用token进行认证并且在请求之间不维护session状态.Laravel使用LaravelPassp ...

  8. PHP过滤评论关键词

    <?php /** * PHP中屏蔽过滤指定关键字实现方法总结 * http://www.111cn.net/phper/phpanqn/46225.htm * * 思路: * 一.把关键字专门 ...

  9. function adapter(函数适配器)和迭代器适配器

    所谓function adapter(函数适配器)是指能够将不同的函数对象(或是和某值或某寻常函数)结合起来的东西,它自身也是个函数对象. 迭代器适配器  运用STL中的迭代器适配器,可以使得算法能够 ...

  10. android 系统相册调用,各版本的区别总结

    请求系统相册有三个Action: (注意以下  图库(缩略图)   和  图片(原图)  的区别) ACTION_OPEN_DOCUMENT    仅限4.4或以上使用  默认打开原图 ACTION_ ...