Difference Between MsgGet, MessageBox, & MsgGetText PeopleCode Functions

Your rating: None Average: 3.8 (12 votes)

Wondering why there are 3 different functions or ways to get text
from a message catalog? Check the comparison below and decide which one
best fits your needs.

MsgGet(message_set, message_num, default_msg_txt [, paramlist])
The MsgGet function
retrieves a message from the PeopleCode Message Catalog and substitutes
in the values of the parameters into the text message.
Example: &MsgText = MsgGet(30000, 2, "Message not found");

MessageBox
retrieves messages from the Message Catalog but provides the
flexibility to change the severity of a message through the Message
Catalog, without modifying PeopleCode.
MessageBox(style, title, message_set, message_num, default_txt [, paramlist])
Example: MessageBox(0, "", 30000, 1, "Message not found", BUS_EXPENSE_PER.EMPLID, BUS_EXPENSE_PER.EXPENSE_PERIOD_DT);

MsgGetText is very similar to MsgGet except the message set and message number will not appear after the text of the message.

MsgGetText(message_set, message_num, default_msg_txt [, paramlist])
Example: &MsgText = MsgGetText(30000, 2, "Message not found");

Please try to help out with unanswered topics on the forum. Chances are you have had the same issue/question some time in your IT career!

Comments

Have a question? Please ask it on the forum instead.
Chris's picture
Chris (not verified)
Re: Difference Between MsgGet, MessageBox, & MsgGetText ...

If using the MessageBox command, how do you hide the message set and message number in a MessageBox? I understand how to do that using MsgGetText vs. MsgGet, but how do I hide the message set and message number using the MessageBox command?

Lepa's picture
User offline. Last seen 4 weeks 12 hours ago. Offline
Joined: 06/23/2008
Posts: 590
Re: Difference Between MsgGet, MessageBox, & MsgGetText ...

Quote:
but how do I hide the message set and message number using the MessageBox command

I don't think that is possible.

Give back to the community and help it grow!
* Help with unanswered forum questions and issues
* Register or login to share your knowledge at your own blog

Siddharth's picture
User offline. Last seen 1 year 43 weeks ago. Offline
Joined: 05/13/2011
Posts: 2
Re: Difference Between MsgGet, MessageBox, & MsgGetText ...

How do you hide the message set and message number in a MessageBox??
Here is the solution for hiding message set and message number,

WinMessage(MsgGetText(&MessageSet, &MessageNumber, "Alt Text"),0);

Post new comment

The content of this field is kept private and will not be shown publicly.
CAPTCHA
The question below is to prevent automated spam submissions.
5 + 6 =
Solve this simple math problem and enter the result. E.g. for 1+3, enter 4.