Determining Current Block and Current Item in Oracle Forms

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;

View Oracle Developer Handbook at Amazon.com

时间: 2024-10-17 23:46:23

Determining Current Block and Current Item in Oracle Forms的相关文章

Populate A List Item With Record Group In Oracle Forms Using Populate_List And Create_Group_From_Query Command

Example is given below to Populate a List Item in Oracle Forms using Create_Group_From_Query , Populate_List and Populate_Group command. In this example you can specify the query at run time to populate the list item with that query result. Following

How To Use DBLink In Oracle Forms 6i

You want to connect multiple databases in oracle forms to perform certain tasks, for example you need to execute ddl or dml statements against databases but when you try to use dblink it gives you error or suddenly quits from the oracle forms. Soluti

8 Most Required Examples Reference For Oracle Forms

Check the following 8 Links for best Oracle Forms examples with source code (Fmb files), which will work in any version of Oracle Forms. The examples are given for "Oracle Form's Triggers", "Hierarchical Trees", "Stacked Canvases&

Oracle RAC 全局等待事件 gc current block busy 和 gc cr multi block request 说明--转载(http://blog.csdn.net/tianlesoftware/article/details/7777511)

一.RAC 全局等待事件说明 在RAC环境中,和全局调整缓存相关的最常见的等待事件是global cache cr request,global cache busy和equeue. 当一个进程访问需要一个或者多个块时,Oracle会首先检查自己的Cache是否存在该块,如果发现没有,就会先通过global cache赋予这些块共享访问的权限,然后再访问.假如,通过global cache发现这些块已经在另一个实例的Cache里面,那么这些块就会通过Cache Fusion,在节点之间直接传递,

hadoop错误Could not obtain block blk_XXX_YYY from any node:java.io.IOException:No live nodes contain current block

错误: 10/12/08 20:10:31 INFO hdfs.DFSClient: Could not obtain block blk_XXXXXXXXXXXXXXXXXXXXXX_YYYYYYYY from any node: java.io.IOException: No live nodes contain current block. Will get new block locations from namenode and retry 原因: Datanode 有一个同时处理文件

Find Current Job Openings For Oracle Forms & Reports

Oracle Form & Reports developer jobs are always in demand, candidates who have Oracle D2k, Oracle Forms & Reports, PLSQL set of skills can find the job through the following links: http://jobsearch.naukri.com/oracle-forms-and-reports-jobs http://j

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 following are the steps: Create a data block manually and set the following properties: You can specify different query as per your need. Then create the it

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 bottom in Oracle forms. You can do this task by using :system.last_record system variable to determine whether it is last record in a block and then

Adding List Item Element At Runtime In Oracle Forms

Add combo list / drop down list item element at runtime in Oracle forms. Syntax PROCEDURE ADD_LIST_ELEMENT(list_name VARCHAR2,list_index, NUMBERlist_label VARCHAR2,list_value NUMBER); Example Declare  nElmntCount Number;Begin   -- First count the tot