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. 【linux】自定义配置debian+openbox

    openbox确实是好东西阿,小巧,不开iceweasel时内存总使用量不到200M,功能又强大,不过限于我是菜鸟,openbox再强大也有限...debian装openbox是及其简单的,不过为了使 ...

  2. 在MVC里面使用Response.Redirect方法后记得返回EmptyResult

    在ASP.NET MVC中我们很多时候都会在拦截器和Controller中直接使用Response.Redirect方法做跳转,但是实际上Response.Redirect方法执行后ASP.NET并不 ...

  3. URL 中#号,? ,&的作用 (摘抄整理 链接为学习地址)

    1. 一峰的网络日志:http://www.ruanyifeng.com/blog/2011/03/url_hash.html get: 1.页面滚动到指定页面的指定位置 (eg: http://ww ...

  4. mysql字符串相关

    使用MySQL,我们很多时候都会出现需要截取字符串的情况,所以关于字符串的截取的方式有必要记录下去. MySQL截取字符串的函数有: left(str, length):从左边开始截取,length是 ...

  5. vsftp不同帐号的目录和权限

    搭建FTP服务器,供虚拟用户使用,实现不同用户具有不同家目录和权限. 1.用户peter的家目录为/var/ftp/vuserdir/peter,他只有下载权限,没有其他权限(创建目录.重命名.删除. ...

  6. 关于学习keynote

    下午在学习如何用keynote写出高大上的文档,看到公司内的一个妹纸洋洋洒洒的写了好多篇文章,顿时觉得自己的知识面狭窄,文科女和理科女的差别,从我嘴里半天吐不出一个富有诗情画意的词句来,那么还是脚踏实 ...

  7. 161111、NioSocket的用法(new IO)

    今天先介绍NioSocket的基本用法,实际使用一般会采用多线程,后面会介绍多线程的处理方法. 从jdk1.4开始,java增加了新的io模式--nio(new IO),nio在底层采用了新的处理方式 ...

  8. linux下xargs命令用法详解 【转】

    转自:http://blog.chinaunix.net/uid-128922-id-289992.html xargs在linux中是个很有用的命令,它经常和其他命令组合起来使用,非常的灵活. xa ...

  9. OC基础数据类型-NSData

    1.NSData,数据,当我们需要把一些信息写入到文件里或发送到网络上,我们需要把这些数据转换下,变成纯粹的0.1字符流 1 NSString * str = @"hello, world! ...

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

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