Copy Records From One Data Block To Another Data Block In Oracle Forms
In this tutorial you will learn to copy the records from one data block to another data block on same form and on a same canvas in Oracle Forms.
Below is the screen shot of the form and you can download this form for your reference from the following link (Table script is also included):
In the above picture you can see that there are two blocks, first one is the block based on a table and the second one is a non-database data block, but this is not necessary you can make the block based on a table also.
The functionality of this form is, user will select the record above then click on Copy button to copy the record below, it is like making the selection of records from a data block. User can also remove the records from the second block where the records are being copied.
The whole functionality is written on the push button Copy and below is the code written on When-Button-Pressed trigger:
BEGIN
GO_BLOCK ('COPIED');
FIRST_RECORD;
LOOP
-- CHECK THE VALUE IF RECORD IS EMPTY IF NOT THEN JUMP TO ANOTHER
IF :copied.empno IS NULL
THEN
-- EXIT TO COPY THE RECORD
EXIT;
END IF;
-- ELSE CONTINUE FINDING EMPTY RECORD
IF :SYSTEM.LAST_RECORD = 'TRUE'
THEN
CREATE_RECORD;
EXIT;
END IF;
NEXT_RECORD;
END LOOP;
-- COPY THE RECORD
:copied.empno := :scott_emp.empno;
:copied.ename := :scott_emp.ename;
:copied.job := :scott_emp.job;
:copied.mgr := :scott_emp.mgr;
:copied.hiredate := :scott_emp.hiredate;
:copied.sal := :scott_emp.sal;
:copied.comm := :scott_emp.comm;
:copied.deptno := :scott_emp.deptno;
-- GO BACK TO FIRST BLOCK
GO_BLOCK ('SCOTT_EMP');
END;
You should replace the value of data block and item reference (:copied.empno := :scott_emp.empno) with your form's data block and items.
Below is the code of Remove push button of second data block to clear the record when pressed:
CLEAR_RECORD;
Just a One line code which is sufficient.
Copy Records From One Data Block To Another Data Block In Oracle Forms的更多相关文章
- Moving From Top To Bottom in Detailed Block in Oracle Forms
Suppose you want to scan a tabular grid block (loop through all records in detail block) from top to ...
- Create Stacked Canvas to Scroll Horizontal Tabular Data Blocks In Oracle Forms
In this tutorial you will learn to create horizontal scrollable tabular or detail data block by usin ...
- Populating Tabular Data Block Manually Using Cursor in Oracle Forms
Suppose you want to populate a non-database data block with records manually in Oracle forms. This t ...
- Create Data Block Based On From Clause Query In Oracle Forms
Example is given below to create a data block based on From Clause query in Oracle Forms. The follow ...
- ORA-01578 ORACLE data block corrupted (file # 29, block # 2889087)
BW数据库后台报错如下:F:\oracle\SBP\saptrace\diag\rdbms\sbp\sbp\trace ORA-01578: ORACLE data block corrupted ( ...
- ORA-01578: ORACLE data block corrupted (file # 3, block # 1675)
警告日志中发现如下报错信息: ORA-01578: ORACLE data block corrupted (file # 3, block # 1675)ORA-01110: data file 3 ...
- Checking For User Permissions Before Updating or Inserting The Records in Oracle Forms
Suppose you want to check the user permissions on inserting or updating the records in Oracle Forms, ...
- Create Hierarchical Tree To Control Records In Oracle Forms
Download Source Code Providing an example form for creating hierarchical trees in Oracle Forms to co ...
- block传值以及利用block封装一个网络请求类
1.block在俩个UIViewController间传值 近期刚学了几招block 的高级使用方法,事实上就是利用block语法在俩个UIViewController之间传值,在这里分享给刚開始学习 ...
随机推荐
- OpenStack之虚机热迁移
OpenStack之虚机热迁移 最近要搞虚机的热迁移,所以也就看了看虚机迁移部分的内容.我的系统是CentOS6.5,此处为基于NFS共享平台的虚机迁移.有关NFS共享服务器的搭建可以看这里. Yak ...
- Python框架之Django学习笔记(九)
模型 之前,我们用 Django 建造网站的基本途径: 建立视图和 URLConf . 正如我们所阐述的,视图负责处理一些主观逻辑,然后返回响应结果. 作为例子之一,我们的主观逻辑是要计算当前的日期和 ...
- 9.Iptables与Firewalld防火墙
第9章 Iptables与Firewalld防火墙 章节简述: 保障数据的安全性是继保障数据的可用性之后最为重要的一项工作.防火墙作为公网与内网之间的保护屏障,在保障数据的安全性方面起着至关重要的作用 ...
- ThinkPHP5 连接 PostgreSQL
$request = Db::connect( [ 'type' => 'pgsql', 'hostname' => '127.0.0.1', 'database' => 'keyw ...
- Form 组件动态绑定数据
1.Form 组件的作用: a.对用户提交的数据进行验证(form表单/ajax) b.保留用户上次输入的信息 c.可以生成html标签(input表单类的标签) 2..由于form组件中每个字段都是 ...
- web访问流程
客户端发送请求—->httpd得到请求—->httpd解析请求的格式(html,css,jsp)—->请求相应的PHP解析—->PHP解析程序执行完毕—–>db(数据库) ...
- WINDOWS开发PHP7扩展
最近在做个项目,需要用到唯一ID的生成,原本在Java和Delphi中,做了一个生成20位字符串(160bit)形式的唯一ID的算法,但是对比GUID(128bit),除了看起来比他短之外,其他并无优 ...
- 在smarty模板中使用PHP函数的方法
在smarty模板中如果要在显示的资料使用php函数时,如果是只有一个参数的函数比如说去空白的trim会写成 sample1 代码如下: <{$colname|trim}> 那如果使用像i ...
- [JSOI2012][bzoj4332] 分零食 [FFT]
题面 传送门 思路 首先,这个数据如果没有这么大,我们还是可以做朋友的...... 设$dp\left[i\right]\left[j\right]$代表前j个零食分给了前i个人的方案数 那么dp方程 ...
- JavaScript Array 对象的方法,比如push和unshift
https://www.runoob.com/jsref/jsref-obj-array.html js数组与字符串的相互转换 一.数组转字符串 需要将数组元素用某个字符连接成字符串,示例代码如下: ...