MsgGetExplainText function

Syntax

MsgGetExplainText(message_set, message_num, default_msg_txt[, paramlist])

where paramlist is an arbitrary-length list of parameters of undetermined (Any) data type to be substituted in the resulting text string, in the form:

param1 [, param2]. . .

Description

Use the MsgGetExplainText function to retrieve the Description text of a message from the Message Catalog and substitutes the values of the parameters in paramlist into the Description text. It returns the resulting message as a String data type.

You can access and update messages on Message Catalog page (select PeopleTools, Utilities, Administration, Message Catalog). You can enter messages in multiple languages.

Message sets 1 through 19,999 are reserved for use by PeopleSoft applications. Message sets 20,000 through 32,767 can be used by PeopleSoft users.

Unlike the MsgGet function, MsgGetExplainText returns the message without a message set and message number appended to the message.

Parameters

Parameter Description

message_set

Specify the message set to be retrieved from the catalog. This parameter takes a number value.

message_num

Specify the message number to be retrieved from the catalog. This parameter takes a number value.

default_msg_txt

Specify the text to be displayed if the message isn't found. This parameter takes a string value.

paramlist

Specify values to be substituted into the message explain text.

The parameters listed in the optional paramlist are referenced in the message explain text using the % character followed by an integer referencing the position of the parameter in the function call. For example, if the first and second parameters in paramlist were &FIELDNAME and &USERNAME, they would be inserted into the message string as %1 and %2.

To include a literal percent sign in the string, use %%; %\ is used to indicate an end-of-string and terminates the string at that point. This is generally used to specify fixed-length strings with trailing blanks.

Example

Suppose the following Description text is stored in the Message Catalog:

A reference was made to a record.field (%1.%2) that is not defined within⇒
 Application Designer.  Check for typographical errors in the specification of the⇒
 record.field or use Application Designer to add the new field or record.

Here %1 is a placeholder for the record name and %2 a placeholder for the field name. If the record.field in error was MyRecord.Field5, the above would resolve as follows:

A reference was made to a record.field (MYRECORD.FIELD5) that is not defined⇒
 within Application Designer.  Check for typographical errors in the specification⇒
 of the record.field or use Application Designer to add the new field or record.