Home » Oracle Forms » Examples of SET_ITEM_PROPERTY in Oracle Forms

Examples of SET_ITEM_PROPERTY in Oracle Forms

In Oracle Forms, SET_ITEM_PROPERTY built-in is used to set an Item property at runtime. For example, you want to make enable or disable a push button on a certain condition. Then you can use SET_ITEM_PROPERTY built-in to do that. Below I am giving some examples of SET_ITEM_PROPERTY in Oracle Forms.


SET_ITEM_PROPERTY('block.item_name', property_setting, property_value);

SET_ITEM_PROPERTY Built-in Examples

1. The following example disables a Text Item named ENAME in EMP block.

SET_ITEM_PROPERTY('emp.ename', enabled, property_false);

2. To disable a push button in Oracle Forms. Below example will disable the push button named SAVEBUTTON in CONTROL block.

SET_ITEM_PROPERTY('control.savebutton', enabled, property_false);

3. To enable push button use the following statement.

SET_ITEM_PROPERTY('control.savebutton', enabled, property_true);

4. Change the label of a push button.

SET_ITEM_PROPERTY('control.savebutton', label, 'New Label');

5. Change the prompt text of an item in Oracle Forms.

SET_ITEM_PROPERTY('emp.ename', prompt_text, 'Employee Name: ');

6. Change the width of an item. Applies to push button and text items.

SET_ITEM_PROPERTY('emp.ename', width, 200);

7. To do not allow to update a field.

SET_ITEM_PROPERTY('emp.ename', update_allowed, property_false);

8. Set the visual attribute for an item.

SET_ITEM_PROPERTY('emp.ename', visual_attribute, 'your_visual_attribute_name');

9. To set an item's font bold.

SET_ITEM_PROPERTY('emp.ename', font_weight, font_bold);

10. Set a tooltip text for a push button.

SET_ITEM_PROPERTY('control.savebutton', tooltip_text, 'Click to Save');

See also:

3 thoughts on “Examples of SET_ITEM_PROPERTY in Oracle Forms”

Comments are closed.