Re: Forms 4.5 Blocks and Items
Date: 1998/01/29
Message-ID: <19980129224500.RAA12085_at_ladder02.news.aol.com>#1/1
>I have six canvas and six blocks with the same items. If I want to
>reference the item in one of these blocks without explicit >reference,
The following is an extract from on-line help for forms and describes what you need to do if I have correctly understood your question
Regards
John
John C. Lennon
Utility Partners Inc.
e-mail: jomarlen_at_aol.com
Web Site: http://members.aol.com/jomarlen/
The views expressed in this message
are those of the author and not
necessarily those of U.P. Inc.
and/or its employees.
The COPY Procedure The COPY procedure assigns an indicated value to an indicated variable or item. Unlike standard PL/SQL assignment, however, using the COPY procedure allows you to indirectly reference the item whose value is being set:
:emp.ename := 'smith'; -- direct reference Copy('smith','emp.ename'); -- indirect reference
COPY can be used with the NAME_IN function to assign a value to an item whose name is stored in a reference variable or item:
/* put value 'smith' in item whose name is stored in ref_item */ Copy('smith',Name_In('control.ref_item'));
Why Use Indirect Reference Referencing items indirectly allows you to write
more generic, reusable code. By using variables in place of actual item names,
you can write a subprogram that can operate on any item whose name has been
assigned to the indicated variable.
Also, using indirect reference is mandatory when you refer to the value of a
form bind variable (item, parameter, global variable) in PL/SQL that you write
in a library or a menu module. Because libraries, menus, and forms are
separate application modules, you cannot refer directly to the value of a form
item in a menu-item command or library procedure.
Received on Thu Jan 29 1998 - 00:00:00 CET