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

GET_APPLICATION_PROPERTY Built-in

Description

Returns information about the current Oracle Forms application. You must call the Built-in once for each value you want to retrieve.

Syntax

FUNCTION GET_APPLICATION_PROPERTY
(property NUMBER);

Built-in Type unrestricted function

Returns VARCHAR2

Enter Query Mode yes

Parameters

Specify one of the following constants to return information about your application:

APPLICATION_INSTANCE Returns the pointer value of an instance handle. Only applies to the Microsoft Windows platform. For all other platforms, Oracle Forms returns NULL.

BUILTIN_DATE_FORMAT Returns the current value of the Builtin date format mask (which is held in the Builtin_Date_Format property).

CALLING_FORM Returns the name of the calling form (as indicated by the form module Name property) if the current form was invoked by the CALL_FORM Built-in. If the current form is not a called form, Oracle Forms returns NULL.

CONFIG Returns the name of the configuration section an application is using.

CONNECT_STRING Returns the database connect string of the current operator. If the current operator does not have a connect string, Oracle Forms returns NULL.

CURRENT_FORM Returns the .FMX file name of the form currently being executed.

CURRENT_FORM_NAME Returns the name of the current form as indicated by the form module Name property.

CURSOR_STYLE Returns the name of the current cursor style property. Valid VARCHAR2 return values are BUSY, CROSSHAIR, DEFAULT, HELP, and INSERTION.

DATASOURCE Returns the name of the database that is currently in use. Valid return values are NULL, ORACLE, DB2, NONSTOP, TERADATA, NCR/3600/NCR/3700, and SQLSERVER. This call returns the database name only for connections established by Oracle Forms, not for connections established by On-Logon triggers.

DATETIME_LOCAL_TZ Specifies the local time zone region for DATETIME items.

DATETIME_SERVER_TZ Specifies the server time zone region for DATETIME items.

DISPLAY_HEIGHT Returns the height of the display. The size of each unit depends on how you defined the Coordinate System property for the form module.

DISPLAY_WIDTH Returns the width of the display. The size of each unit depends on how you defined the Coordinate System property for the form module.

ERROR_DATE/DATETIME_FORMAT Returns the current value of the error date or datetime format mask (which is established in the FORMS_Error_Date/Datetime_Format environment variable).

FLAG_USER_VALUE_TOO_LONG Returns the current value of this property, either ‘TRUE’ or ‘FALSE’, which controls truncation of user-entered values that exceed an item’s Maximum Length property.

OPERATING_SYSTEM Returns the name of the operating system that is currently in use. Valid return values are MSWINDOWS, MSWINDOWS32, WIN32COMMON, UNIX, SunOS, MACINTOSH, VMS, and HP-UX.

PASSWORD Returns the password of the current operator.

PLSQL_DATE_FORMAT Returns the current value of the PLSQL date format mask (which is held in the PLSQL_Date_Format property).

SAVEPOINT_NAME Returns the name of the last savepoint Oracle Forms has issued. This call is valid only from an On-Savepoint or On-Rollback trigger. It is included primarily for developers who are using transactional triggers to access a non-ORACLE data source.

SSO_SUBDN Returns a string containing the Single Sign On user's subscriber distinguished name (subscriber dn) if the user has been authenticated via the Login Server; NULL otherwise.

SSO_USERID Returns a string containing the Single Sign On user ID if the user has been authenticated via the Login Server; NULL otherwise.

SSO_USRDN Returns a string containing the Single Sign On user's distinguished name (dn) if the user has been authenticated via the Login Server; NULL otherwise.

TIMER_NAME Returns the name of the most recently expired timer. Oracle Forms returns NULL in response to this constant if there is no timer.

USER_DATE/DATETIME_FORMAT Returns the current value of the user date or datetime format mask (which is established in the FORMSnn_User_Date/Datetime_Format environment variable).

USER_INTERFACE Returns the name of the user interface that is currently in use. Valid return values are MOTIF, MACINTOSH, MSWINDOWS, MSWINDOWS32, WIN32COMMON, WEB, PM, BLOCKMODE, X, and UNKNOWN.

USER_NLS_CHARACTER_SET Returns the current value of the character set portion only of the USER_NLS_LANG environment variable defined for the form operator. If USER_NLS_LANG is not explicitly set, it defaults to the setting of NLS_LANG.

USER_NLS_DATE_FORMAT Obtains the current NLS date format mask. This is equal to the value of the NLS_DATE_FORMAT environment variable if it is set. If it is not set, a default value is derived based on the current NLS territory.

USER_NLS_LANG Returns the complete current value of the USER_NLS_LANG environment variable defined for the form operator, for national language support. If USER_NLS_LANG is not explicitly set, it defaults to the setting of NLS_LANG. USER_NLS_LANG is the equivalent of concatenating USER_NLS_LANGUAGE, USER_NLS_TERRITORY, and USER_NLS_CHARACTER_SET.

USER_NLS_LANGUAGE Returns the current value of the language portion only of the USER_NLS_LANG environment variable defined for the form operator. If USER_NLS_LANG is not explicitly set, it defaults to the setting of NLS_LANG.

USER_NLS_TERRITORY Returns the current value of the territory portion only of the USER_NLS_LANG environment variable defined for the form operator. If USER_NLS_LANG is not explicitly set, it defaults to the setting of NLS_LANG

USERNAME Returns the name of the current operator.

VERSION Returns the version number of the Forms Runtime that is running the application. This value is returned as a string e.g. 10.1.2.0.2
.

Usage Note

GET_APPLICATION_PROPERTY Restrictions

GET_APPLICATION_PROPERTY Examples

Example 1

/*

** Built-in: GET_APPLICATION_PROPERTY
** Example: Determine the name of the timer that just
** expired, and based on the username perform a
** task.
** Trigger: When-Timer-Expired
*/
DECLARE
tm_name VARCHAR2(40);
BEGIN
tm_name := GET_APPLICATION_PROPERTY(TIMER_NAME);

IF tm_name = 'MY_ONCE_EVERY_FIVE_MINUTES_TIMER' THEN

:control.onscreen_clock := SYSDATE;

ELSIF tm_name = 'MY_ONCE_PER_HOUR_TIMER' THEN

Go_Block('connected_users');
Execute_Query;

END IF;
END;

Example 2

/*

** Built-in: GET_APPLICATION_PROPERTY
** Example: Capture the username and password of the
** currently logged-on user, for use in calling
** another Tool.
*/
PROCEDURE Get_Connect_Info( the_username IN OUT VARCHAR2,
the_password IN OUT VARCHAR2,
the_connect IN OUT VARCHAR2) IS
BEGIN
the_username := Get_Application_Property(USERNAME);
the_password := Get_Application_Property(PASSWORD);
the_connect := Get_Application_Property(CONNECT_STRING);
END;