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

MESSAGE_TEXT Built-in

Description

Returns message text for the message that Oracle Forms most recently generated during the current Runform session. MESSAGE_TEXT returns NULL at the beginning of a session, before Oracle Forms generates any messages.

Use MESSAGE_TEXT to test the outcome of a user action (e.g., pressing a key) to determine processing within an On-Message trigger.

Note: If your applications must be supported in more than one language, use the MESSAGE_CODE Built-in instead of the MESSAGE_TEXT Built-in. Referencing message codes rather than message text is particularly useful in applications that provide national language support.

Syntax

FUNCTION MESSAGE_TEXT;

Built-in Type unrestricted function

Returns VARCHAR2

Enter Query Mode yes

Parameters

none

MESSAGE_TEXT Examples

/*

** Built-in: MESSAGE_CODE,MESSAGE_TEXT,MESSAGE_TYPE
** Example: Reword certain FRM message messages by checking
** the Message_Code in an ON-MESSAGE trigger
** Trigger: On-Message
*/
DECLARE
msgnum NUMBER := MESSAGE_CODE;
msgtxt VARCHAR2(80) := MESSAGE_TEXT;
msgtyp VARCHAR2(3) := MESSAGE_TYPE;
BEGIN
IF msgnum = 40400 THEN
Message('Your changes have been made permanent.');
ELSIF msgnum = 40401 THEN
Message('You have no unsaved changes outstanding.');
ELSE
/*
** Print the Normal Message that would have appeared
**
** FRM-12345: Message Text Goes Here
*/
Message(msgtyp||'-'||TO_CHAR(msgnum)||': '||msgtxt);
END IF;
END;