How to Use SET_APPLICATION_PROPERTY in Oracle Forms

When building Oracle Forms applications, developers often need to control how the application behaves at runtime. Oracle provides a powerful built-in procedure called SET_APPLICATION_PROPERTY that allows you to modify certain global properties of your form while it is running. With this procedure, you can control cursor style, message display, navigation, and other aspects of the form’s environment. In this article, we will explore how to use SET_APPLICATION_PROPERTY effectively, with examples, explanations, and best practices.


What is SET_APPLICATION_PROPERTY?

SET_APPLICATION_PROPERTY is a built-in procedure in Oracle Forms used to change the runtime behavior of an application. It belongs to the ORACLE FORMS BUILT-INS group and operates on application-level properties rather than block- or item-level properties.

With this procedure, you can dynamically control how the application looks, feels, and reacts to user actions during execution. It is often paired with GET_APPLICATION_PROPERTY, which retrieves the current value of an application property.


Syntax of SET_APPLICATION_PROPERTY

The general syntax is:

SET_APPLICATION_PROPERTY(property, value);
  • property – The application property you want to set.
  • value – The new value for that property.

Commonly Used Properties

Oracle Forms supports several properties that can be changed with SET_APPLICATION_PROPERTY. Some of the most important ones include:

  1. CURSOR_STYLE
    • Controls how the cursor appears in the form.
    • Possible values:
      • DEFAULT_CURSOR
      • BUSY_CURSOR
      • ARROW_CURSOR
  2. MESSAGE_LEVEL
    • Defines the type of system messages displayed to the user.
    • Lower values display more messages; higher values suppress them.
  3. NAVIGATION_STYLE
    • Controls how navigation occurs between items.
    • Possible values:
      • ENTER_QUERY
      • NORMAL
  4. ISOLATION_LEVEL
    • Determines transaction isolation in the form.

Practical Examples

1. Changing the Cursor Style

When performing long-running operations, you can change the cursor to indicate that the system is busy.

BEGIN
   SET_APPLICATION_PROPERTY(CURSOR_STYLE, 'BUSY_CURSOR');
   -- Some processing code
   SET_APPLICATION_PROPERTY(CURSOR_STYLE, 'DEFAULT_CURSOR');
END;

This ensures users know the form is processing data and prevents confusion.


2. Controlling Message Display

Oracle Forms generates many messages, some of which may not be necessary for end-users. You can control the message level to reduce clutter.

BEGIN
   SET_APPLICATION_PROPERTY(MESSAGE_LEVEL, 5);
   -- Higher level suppresses less important messages
END;

For example, setting MESSAGE_LEVEL to 5 suppresses all system messages except critical errors.


3. Controlling Navigation Style

You can restrict navigation to ensure users follow a specific sequence.

BEGIN
   SET_APPLICATION_PROPERTY(NAVIGATION_STYLE, 'ENTER_QUERY');
END;

This can force the form to enter Query Mode for controlled data retrieval.


Best Practices for Using SET_APPLICATION_PROPERTY

  1. Use it contextually – Only set properties when necessary and reset them afterward.
  2. Avoid suppressing important messages – Hiding too many messages may confuse users.
  3. Pair with GET_APPLICATION_PROPERTY – Always check the current property before changing it.
  4. Use for better UX – Cursor styles and message levels help improve user interaction.
  5. Reset to defaults – After temporary changes, return to default settings to maintain consistency.

Limitations of SET_APPLICATION_PROPERTY

While useful, this procedure has some limitations:

  • Not all properties can be changed at runtime.
  • Some changes only apply for the session and reset when the form restarts.
  • Overuse may confuse users if the behavior is inconsistent.

Conclusion

The SET_APPLICATION_PROPERTY built-in in Oracle Forms provides developers with a convenient way to control application behavior at runtime. From changing cursor styles to suppressing unnecessary messages, it helps improve user experience and program control. By using it carefully and resetting properties when appropriate, you can make your Oracle Forms applications more intuitive, professional, and user-friendly.

Vinish Kapoor
Vinish Kapoor

Vinish Kapoor is a seasoned software development professional and a fervent enthusiast of artificial intelligence (AI). His impressive career spans over 25+ years, marked by a relentless pursuit of innovation and excellence in the field of information technology. As an Oracle ACE, Vinish has distinguished himself as a leading expert in Oracle technologies, a title awarded to individuals who have demonstrated their deep commitment, leadership, and expertise in the Oracle community.

guest

0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments