Returns property values for the specified item. Note that in some cases you may be able to get—but not set—certain object properties.
FUNCTION GET_ITEM_PROPERTY
(item_id ITEM,
property NUMBER);
FUNCTION GET_ITEM_PROPERTY
(item_name VARCHAR2,
property NUMBER);
Built-in Type unrestricted function
Returns VARCHAR2
Enter Query Mode yes
AUTO_HINT Returns the VARCHAR2 string TRUE if the Automatic Hint property is set to Yes, and the VARCHAR2 string FALSE if it is set to No.
AUTO_SKIP Returns the VARCHAR2 string TRUE if Automatic Skip is set to Yes for the item, and the string FALSE if it is set to No for the item.
BACKGROUND_COLOR The color of the object's background region.
BLOCK_NAME Returns the VARCHAR2 block name for the item.
BORDER_BEVEL Returns RAISED, LOWERED, or PLAIN if the BORDER_BEVEL property is set to RAISED, LOWERED, or PLAIN, respectively at the item level.
CASE_INSENSITIVE_QUERY Returns the VARCHAR2 string TRUE if this property is set to Yes for the item, and the string FALSE if the property is set to No.
CASE_RESTRICTION Returns UPPERCASE if text for the item is to display in upper case, LOWERCASE if the text is to display in lower case, or NONE if no case restriction is in force.
COLUMN_NAME Returns the name of the column in the database to which the datablock item is associated.
CONCEAL_DATA Returns the VARCHAR2 string TRUE if the text an operator types into the text item is to be hidden, and the VARCHAR2 string FALSE if the text an operator types into the text item is to be displayed.
CURRENT_RECORD_ATTRIBUTE Specifies VARCHAR2 name of the named visual attribute used when an item is part of the current record. If the named visual attribute does not exist, you will get an error message.
CURRENT_ROW_BACKGROUND_COLOR The color of the current record's background region in the current record.
CURRENT_ROW_FILL_PATTERN The pattern to be used for the current records's fill region in the current record. Patterns are rendered in the two colors specified by Background Color and Foreground Color.
CURRENT_ROW_FONT_NAME The font family, or typeface, that should be used for text in the current row in the current record. The list of fonts available is system-dependent.
CURRENT_ROW_FONT_SIZE The size of the font, specified in points in the current record.
CURRENT_ROW_FONT_SPACING The width of the font, that is, the amount of space between characters (kerning) in the current record.
CURRENT_ROW_FONT_STYLE The style of the font in the current record.
CURRENT_ROW_FONT_WEIGHT The weight of the font in the current record.
CURRENT_ROW_FOREGROUND_COLOR The color of the object's foreground region in the current record. For items, the Foreground Color attribute defines the color of text displayed in the item.
DATA_LENGTH_SEMANTICS Determines the semantics of the MAX_LENGTH and QUERY_LENGTH properties, when it is used to enforce the maximum size of the internal value of a character item.
DATABASE_VALUE For a base table item, returns the value that was originally fetched from the database.
DATATYPE Returns the data type of the item: ALPHA, CHAR, DATE, JDATE, EDATE, DATETIME, INT, RINT, MONEY, RMONEY, NUMBER, RNUMBER, TIME, LONG, GRAPHICS, or IMAGE. Note that some item types, such as buttons and charts, do not have data types. To avoid an error message in these situations, screen for item type before getting data type.
DIRECTION Returns the layout direction for bidirectional objects. Valid return values are RIGHT_TO_LEFT, LEFT_TO_RIGHT.
DISPLAYED Returns the VARCHAR2 string TRUE or FALSE.
ECHO Returns the VARCHAR2 string TRUE if the Conceal Data property is set to No for the item, and the VARCHAR2 string FALSE if the Conceal Data property is set to Yes for the item.
EDITOR_NAME Returns the name of the editor attached to the text item.
EDITOR_X_POS Returns the x coordinate of the editor attached to the text item. (Corresponds to the Editor Position property.)
EDITOR_Y_POS Returns the y coordinate of the editor attached to the edit item. (Corresponds to the Editor Position property.)
ENFORCE_KEY Returns the name of the item whose value is copied to this item as a foreign key when a new record is created as part of a master-detail relation. (Corresponds to the Copy property.)
ENABLED Returns TRUE if enabled property is set to Yes, FALSE if set to No.
FILL_PATTERN The pattern to be used for the object's fill region. Patterns are rendered in the two colors specified by Background Color and Foreground Color.
FONT_NAME The font family, or typeface, that should be used for text in the object. The list of fonts available is system-dependent.
FONT_SIZE The size of the font, specified in hundredths of a point (i.e., an item with a font size of 8 points will return 800).
FONT_SPACING The width of the font, that is, the amount of space between characters (kerning).
FONT_STYLE The style of the font.
FONT_WEIGHT The weight of the font.
FOREGROUND_COLOR The color of the object's foreground region. For items, the Foreground Color attribute defines the color of text displayed in the item. Foreground color is always ignored for scrollbars.
FORMAT_MASK Returns the format mask used for the text item.
HEIGHT Returns the height of the item. The size of the units depends on the Coordinate System and default font scaling you specified for the form.
HINT_TEXT Returns the item-specific help text displayed on the message line at runtime.
ICON_NAME Returns the file name of the icon resource associated with a button item having the iconic property set to TRUE.
ICONIC_BUTTON Returns the VARCHAR2 value TRUE if the button is defined as iconic, and the VARCHAR2 value FALSE if it is not an iconic button.
INSERT_ALLOWED Returns the VARCHAR2 string TRUE if the INSERT_ALLOWED property is set to true at the item level. Returns the string FALSE if the property is set to false.
ITEM_CANVAS Returns the name of the canvas to which the item is assigned.
ITEM_IS_VALID Returns the VARCHAR2 string TRUE if the current item is valid, and the VARCHAR2 string FALSE if the current item is not valid.
ITEM_NAME Returns the name of the item.
ITEM_TAB_PAGE Returns the name of the tab page to which the item is assigned. Note that the item must be assigned to a tab canvas in order for Oracle Forms to return the name of the item's tab page.
ITEM_TYPE Returns the type of the item. Returns BUTTON if the item is a button, CHART ITEM if the item is a chart item, CHECKBOX if the item is a check box, DISPLAY ITEM if the item is a display item, IMAGE if the item is an image item, LIST if the item is a list item, RADIO GROUP if the item is a radio group, TEXT ITEM if the item is a text item, and USER AREA if the item is a user area.
JUSTIFICATION Returns the text alignment for text items and display items only. Valid return values are START, END, LEFT, CENTER, RIGHT.
KEEP_POSITION Returns the VARCHAR2 string TRUE if the cursor is to re-enter at the identical location it was in when it left the item, and the VARCHAR2 string FALSE if the cursor is to re-enter the item at its default position.
LABEL Returns the VARCHAR2 value defined for the item's Label property. This property is valid only for items that have labels, such as buttons and check boxes.
LIST Returns the VARCHAR2 string TRUE if the item is a text item to which a list of values (LOV) is attached; otherwise returns the VARCHAR2 string FALSE.
LOCK_RECORD_ON_CHANGE Returns the VARCHAR2 string TRUE if Oracle Forms should attempt to lock a row based on a potential change to this item, and returns the VARCHAR2 string FALSE if no lock should be attempted.
LOV_NAME Returns the VARCHAR2 name of the LOV associated with the given item. If the LOV name does not exist, you will get an error message.
LOV_X_POS Returns the x coordinate of the LOV associated with the text item. (Corresponds to the List X Position property.)
LOV_Y_POS Returns the y coordinate of the LOV associated with the text item. (Corresponds to the List Y Position property.)
MAX_LENGTH Returns the maximum length setting for the item. The value is returned as a whole NUMBER.
MOUSE_NAVIGATE Returns the VARCHAR2 string TRUE if Mouse Navigate is set to Yes for the item, and the VARCHAR2 string FALSE if it is set to No for the item.
MULTI_LINE Returns the VARCHAR2 value TRUE if the item is a multi-line text item, and the VARCHAR2 string FALSE if it is a single-line text item.
NAVIGABLE Returns the VARCHAR2 string TRUE if the NAVIGABLE property is set to true at the item level. Returns the string FALSE if the property is set to false.
NEXTITEM Returns the name of the next item in the default navigation sequence, as defined by the order of items in the Object Navigator.
NEXT_NAVIGATION_ITEM Returns the name of the item that is defined as the "next navigation item" with respect to this current item.
PREVIOUSITEM Returns the name of the previous item.
PREVIOUS_NAVIGATION_ITEM Returns the name of the item that is defined as the "previous navigation item" with respect to this current item.
PRIMARY_KEY Returns the VARCHAR2 value TRUE if the item is a primary key, and the VARCHAR2 string FALSE if it is not.
PROMPT_ALIGNMENT_OFFSET Returns the distance between the item and its prompt as a VARCHAR2 value.
PROMPT_DISPLAY_STYLE Returns the prompt’s display style, either FIRST_RECORD or HIDDEN.
PROMPT_EDGE Returns a value that indicates which edge the item’s prompt is attached to, either START, END, TOP, or BOTTOM.
PROMPT_EDGE_ALIGNMENT Returns a value that indicates which edge the item’s prompt is aligned to, either START, END, or CENTER.
PROMPT_EDGE_OFFSET Returns the distance between the item and its prompt as a VARCHAR2 value.
PROMPT_FILL_PATTERN The pattern to be used for the object's fill region. Patterns are rendered in the two colors specified by Background Color and Foreground Color.
PROMPT_FONT_NAME The font family, or typeface, that should be used for text in the object. The list of fonts available is system-dependent.
PROMPT_FONT_SIZE The size of the font, specified in points.
PROMPT_FONT_SPACING The width of the font, that is, the amount of space between characters (kerning).
PROMPT_FONT_STYLE The style of the font.
PROMPT_FONT_WEIGHT The weight of the font.
PROMPT_FOREGROUND_COLOR The color of the object's foreground region. For items, the Foreground Color attribute defines the color of text displayed in the item.
PROMPT_TEXT Returns the text label that displays for an item.
PROMPT_TEXT_ALIGNMENT Returns a value that indicates how the prompt is justified, either START, LEFT, RIGHT, CENTER, or END.
PROMPT_VISUAL_ATTRIBUTE Returns a value that indicates the prompt’s named visual attribute .
QUERYABLE Returns the VARCHAR2 string TRUE if the item can be included in a query, and the VARCHAR2 string FALSE if it cannot.
QUERY_LENGTH Returns the number of characters an operator is allowed to enter in the text item when the form is in Enter Query mode.
QUERY_ONLY Returns the VARCHAR2 string TRUE if property is set to Yes for the item, and the VARCHAR2 string FALSE if the property is set to No for the item.
RANGE_HIGH Returns the high value of the range limit. (Corresponds to the Range property.)
RANGE_LOW Returns the low value of the range limit. (Corresponds to the Range property.)
RECORDS_DISPLAYED Returns the number of records that the given block can display. Corresponds to the Number of Records Displayed block property.
REQUIRED For multi-line text items, returns the VARCHAR2 string TRUE if the REQUIRED property is set to true at the item level. Returns the string FALSE if the property is set to false.
SCROLLBAR Returns the VARCHAR2 string TRUE if the Show Scroll Bar property is Yes, and the VARCHAR2 string FALSE if the Show Scroll Bar property is No.
TOOLTIP_BACKGROUND_COLOR The color of the tooltip's background region.
TOOLTIP_FILL_PATTERN The pattern to be used for the tooltip's fill region. Patterns are rendered in the two colors specified by Background Color and Foreground Color.
TOOLTIP_FONT_NAME The font family, or typeface, that should be used for text in the tooltip. The list of fonts available is system-dependent.
TOOLTIP_FONT_SIZE The size of the font, specified in points.
TOOLTIP_FONT_SPACING The width of the font, that is, the amount of space between characters (kerning).
TOOLTIP_FONT_STYLE The style of the font.
TOOLTIP_FONT_WEIGHT The weight of the font.
TOOLTIP_FOREGROUND_COLOR The color of the tooltip's foreground region. For items, the Foreground Color attribute defines the color of text displayed in the item.
UPDATE_ALLOWED Returns the VARCHAR2 string TRUE if the UPDATE_ALLOWED property is set to true at the item level. Returns the string FALSE if the property is set to false.
UPDATE_COLUMN Returns the VARCHAR2 string TRUE if Oracle Forms should treat the item as updated, and FALSE if it should not.
UPDATE_NULL Returns the VARCHAR2 string TRUE if the item should be updated only if it is NULL, and the VARCHAR2 string FALSE if it can always be updated. (Corresponds to the Update if NULL property.)
UPDATE_PERMISSION Returns the VARCHAR2 string TRUE if the UPDATE_PERMISSION property is set to ON, turning on the item's UPDATEABLE and UPDATE_NULL properties. The VARCHAR2 string FALSE indicates that UPDATEABLE and UPDATE_NULL are turned off.
VALIDATE_FROM_LIST Returns the VARCHAR2 string TRUE if Oracle Forms should validate the value of the text item against the values in the attached LOV; otherwise returns the VARCHAR2 string FALSE.
VISIBLE Returns the VARCHAR2 string TRUE if the property is set to Yes for the item, and the VARCHAR2 string FALSE if the property is set to No for the item.
VISUAL_ATTRIBUTE Specifies the named visual attribute that should be applied to the object at runtime. A visual attribute defines a collection of font, color, and pattern attributes that determine the appearance of the object. .
WIDTH Returns the width of the item.
WINDOW_HANDLE Returns the a unique internal VARCHAR2 constant that is used to refer to objects. Returns the VARCHAR2 value ‘0’ if the platform is not Microsoft Windows.
WRAP_STYLE WRAP_STYLE Returns CHARACTER if the item has wrap style set to Character; WORD if word wrap is set, NONE if no wrap style is specified for the item.
X_POS Returns the x coordinate that reflects the current placement of the item's upper left corner relative to the upper left corner of the canvas.
Y_POS Returns the y coordinate that reflects the current placement of the item's upper left corner relative to the upper left corner of the canvas.
If you attempt to use GET_ITEM_PROPERTY to get a property for an item that is not valid for that item, an error will occur. For example, an error will occur when you attempt to get LIST from a radio group because LIST is valid only for text items.
/*
** Built-in: GET_ITEM_PROPERTY
** Example: Navigate to the next required item in the
** current block. */
PROCEDURE Go_Next_Required_Item IS
cur_blk VARCHAR2(40);
cur_itm VARCHAR2(80);
orig_itm VARCHAR2(80);
first_itm VARCHAR2(80);
wrapped BOOLEAN := FALSE;
found BOOLEAN := FALSE;
Exit_Procedure EXCEPTION;
/*
** Local function returning the name of the item after the
** one passed in. Using NVL we make the item after the
** last one in the block equal the first item again.
*/
FUNCTION The_Item_After(itm VARCHAR2)
RETURN VARCHAR2 IS
BEGIN
RETURN cur_blk||'.'||
NVL(Get_Item_Property(itm,NEXTITEM),
first_itm);
END;
BEGIN
cur_blk := :System.Cursor_Block;
first_itm := Get_Block_Property( cur_blk, FIRST_ITEM );
orig_itm := :System.Cursor_Item;
cur_itm := The_Item_After(orig_itm);
/*
** Loop until we come back to the item name where we started
*/
WHILE (orig_itm <> cur_itm) LOOP
/*
** If required item, set the found flag and exit procedure
*/
IF Get_Item_Property(cur_itm,REQUIRED) = 'TRUE' THEN
found := TRUE;
RAISE Exit_Procedure;
END IF;
/*
** Setup for next iteration
*/
cur_itm := The_Item_After(cur_itm);
END LOOP;
/*
** If we get here we wrapped all the way around the
** block's item names
*/
wrapped := TRUE;
RAISE Exit_Procedure;
EXCEPTION
WHEN Exit_Procedure THEN
/*
** If we found a required item and we didn't come back
** to the item we started in, then navigate there
*/
IF found AND NOT wrapped THEN
Go_Item(cur_itm);
END IF;
END;