博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
Determining Current Block and Current Item in Oracle Forms
阅读量:5946 次
发布时间:2019-06-19

本文共 2042 字,大约阅读时间需要 6 分钟。

SYSTEM.CURSOR_BLOCK

Determining current block in Oracle Forms Using SYSTEM.CURSOR_BLOCK system variable. The value that the SYSTEM.CURSOR_BLOCK system variable represents depends on the current
navigation unit:
If the current navigation unit is the block, record, or item (as in the Pre- and Post- Item, Record, and Block triggers), the value of SYSTEM.CURSOR_BLOCK is the name of the block where the cursor is located. The value is always a character string. If the current navigation unit is the form (as in the Pre- and Post-Form triggers), the value of SYSTEM.CURSOR_BLOCK is NULL.
SYSTEM.CURSOR_BLOCK examples
Assume that you want to create a Key-NXTBLK trigger at the form level that navigates depending on what the current block is. The following trigger performs this function, using :SYSTEM.CURSOR_BLOCK stored in a local variable.
DECLARE
curblk VARCHAR2(30);
BEGIN
curblk := :System.Cursor_Block;
IF curblk = ’ORDERS’
THEN Go_Block(’ITEMS’);
ELSIF curblk = ’ITEMS’
THEN Go_Block(’CUSTOMERS’);
ELSIF curblk = ’CUSTOMERS’
THEN Go_Block(’ORDERS’);
END IF;
END;

SYSTEM.CURSOR_ITEM

Determining current item using System.Cursor_Item in Oracle Forms. SYSTEM.CURSOR_ITEM represents the name of the block and item, block.item, where the input focus (cursor) is located.The value is always a character string.
Usage Notes
Within a given trigger, the value of SYSTEM.CURSOR_ITEM changes when navigation takes place. This differs from SYSTEM.TRIGGER_ITEM, which remains the same from the beginning to the end of single trigger.
SYSTEM.CURSOR_ITEM examples
Assume that you want to create a user-defined procedure that takes the value of the item where the cursor is located (represented by SYSTEM.CURSOR_VALUE), then multiplies the value by a constant, and then reads the modified value into the same item. The following user-defined procedure uses the COPY built-in to perform this function.
 
PROCEDURE CALC_VALUE IS
new_value NUMBER;
BEGIN
new_value := TO_NUMBER(:System.Cursor_Value) * .06;
Copy(TO_CHAR(new_value), :System.Cursor_Item);
END;

 

转载地址:http://dkbxx.baihongyu.com/

你可能感兴趣的文章
django中聚合aggregate和annotate GROUP BY的使用方法
查看>>
TFS简介
查看>>
docker管理平台 shipyard安装
查看>>
安装django
查看>>
Bootstrap3 栅格系统-简介
查看>>
ADODB类库操作查询数据表
查看>>
【java】File的使用:将字符串写出到本地文件,大小0kb的原因
查看>>
安卓音乐播放器开发实例
查看>>
some requirement checks failed
查看>>
存储管理
查看>>
HDU-2089-不要62
查看>>
Latex学习笔记0
查看>>
css控制div强制换行
查看>>
ios 底部用定位 fixed。在软件盘出来后,页面元素被顶上去一部分,fixed定位的footer也跑到了上面去。解决方法...
查看>>
HDU1257题解
查看>>
Iterator
查看>>
Spring MVC整合Velocity
查看>>
fiddler+android抓包工具配置使用
查看>>
Spring Data JPA 复杂/多条件组合分页查询
查看>>
css文本 颜色1
查看>>