Determining current Block and current Item in Oracle Forms

Source: Internet
Author: User
Tags oracle developer

SYSTEM. Cursor_block determining current BLOCK in Oracle Forms Using SYSTEM. Cursor_block system variable. The value of the SYSTEM. Cursor_block system variable represents depends on the current navigation unit:
If the current navigation unit was 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 was the form (as in the Pre-and post-form triggers), the value of SYSTEM. Cursor_block is NULL.
SYSTEM. Cursor_block examples
Assume this want to create a KEY-NXTBLK trigger at the form level, navigates depending on what the current block I S. 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 the 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 the from SYSTEM. Trigger_item, which remains the same from the beginning to the end of a single TRIGGER.
SYSTEM. Cursor_item examples assume that's want to create a user-defined procedure that takes the value of the ITEM where the CU Rsor 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

Determining current Block and current Item in Oracle Forms

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.