A script-enabled browser is required for this page to function properly.

SET_ITEM_INSTANCE_PROPERTY Built-in

Description

Modifies the current item instance in a block by changing the specified item property. SET_ITEM_INSTANCE_PROPERTY does not change the appearance of items that mirror the current instance.

You can reference any item in the current form. Note that SET_ITEM_INSTANCE_PROPERTY only affects the display of the current instance of the item; other instances of the specified item are not affected. This means that if you specify a display change for an item that exists in a multi-record block, SET_ITEM_INSTANCE_PROPERTY only changes the instance of that item that belongs to the block's current record. If you want to change all instances of an item in a multi-record block, use SET_ITEM_PROPERTY .

Any change made by a SET_ITEM_INSTANCE_PROPERTY remains in effect until they::

Syntax

SET_ITEM_INSTANCE_PROPERTY
(item_id ITEM,
record_number
NUMBER,
property
NUMBER,
value
VARCHAR2);

SET_ITEM_INSTANCE_PROPERTY
(item_id ITEM,
record_number
NUMBER,
property
NUMBER,
value
NUMBER);

SET_ITEM_INSTANCE_PROPERTY
(item_name VARCHAR2,
record_number
NUMBER,
property
NUMBER,
value
VARCHAR2);

SET_ITEM_INSTANCE_PROPERTY
(item_name VARCHAR2,
record_number
NUMBER,
property
NUMBER,
value
NUMBER);

Built-in Type unrestricted procedure

Enter Query Mode yes

Parameters

item_id 
 
The unique ID that Oracle Forms assigned to the object when it created it. Use the FIND_ITEM Built-in to return the ID to a variable with datatype of ITEM.
 
record_number 
 
The record number that you want to set. The record number is the record's position in the block. Specify as a whole number. You can specify CURRENT_RECORD if you want to set the block's current record.
 
item_name 
 
The name you gave the item when you created it. Datatype is VARCHAR2.
 
property 
 
The property you want to set for the given item. Possible properties are:

BORDER_BEVEL Specifies the item border bevel for the specified item instance. Valid values are RAISED, LOWERED, INSET, OUTSET, PLAIN, NONE, or ' ' (2 single quotes). A null value, designated by two single quotes, causes the border bevel to be determined by the value specified at the item level at design-time or by SET_ITEM_PROPERTY at runtime.

Note: You cannot set BORDER_BEVEL if the item's Bevel property is set to None in Oracle Forms.

INSERT_ALLOWED Applies only to records not retrieved from the database. When set to PROPERTY_TRUE at the item instance, item, and block levels, allows the end user to modify the item instance. Setting this property to PROPERTY_FALSE at the item instance, item, or block levels, prohibits the end user from modifying the item instance.

NAVIGABLE When set to PROPERTY_TRUE at the item instance and item levels, allows the end user to be able to navigate to the item instance using default keyboard navigation. Setting this property to PROPERTY_FALSE at the item instance or item levels, disables default keyboard navigation to the item instance. This property has no effect on buttons; however, you can make a button navigable by setting the Enabled property.

REQUIRED Specify the constant PROPERTY_TRUE if you want to force the end user to enter a non-null value for the item instance. Setting this property to PROPERTY_FALSE at the item instance and item levels, indicates that the item instance is not required.

UPDATE_ALLOWED Applies only to records retrieved from the database. When set to PROPERTY_TRUE at the item instance, item, and block levels, allows the end user to modify the item instance. When set to PROPERTY_FALSE at the instance, item, or block levels, prohibits the end user from modifying the item instance.

VISUAL_ATTRIBUTE Specify a valid named visual attribute that exists in the current form or ''. Specifying '' leaves visual attribute unspecified at the item instance level.

Usage Notes

When working with properties specified at multiple levels (item instance, item, and block), consider the following guidelines:

The value derived from combining properties specified at the item instance, item, and block levels is called the effective value. Some of the effects of these two rules are as follows:

SET_ITEM_INSTANCE_PROPERTY Examples

/*

** Built-in: SET_ITEM_INSTANCE_PROPERTY
** Example: Change the visual attribute of each item instance in the
** current record

*/
DECLARE
cur_itm VARCHAR2(80);
cur_block VARCHAR2(80) := :System.Cursor_Block;
BEGIN
cur_itm := Get_Block_Property( cur_block, FIRST_ITEM );
WHILE ( cur_itm IS NOT NULL ) LOOP
cur_itm := cur_block||'.'||cur_itm;
Set_Item_Instance_Property( cur_itm, CURRENT_RECORD,
VISUAL_ATTRIBUTE,'My_Favorite_Named_Attribute');
cur_itm := Get_Item_Property( cur_itm, NEXTITEM );
END LOOP;
END;