Message Library Maintenance |
Most end-user facing messages in Webster+ come from a system message library. This allows for standardized messaging that can be easily maintained and updated from a common source. Message libraries are also useful in supporting multilingual environments. The Message Library Maintenance utility is used to create an application specific library and to add/edit the text of messages that will be displayed to the user.
To run the Message Library Maintenance utility, select Messages from the top menu of the Webster+ system setup. The following window is displayed:
This window consists of the following:
Library |
By default, the system will be set to access your application library, if present. You can select the desired library you are working with by using the drop list. |
Message Key |
Each message in the system has a unique case insensitive Message Key, which can be used in your application to recall the message text. Click the lookup button to display a list of the messages currently in the library. Use the navigation buttons to move between the messages in the library. |
Message Text |
Message text that will be displayed. This can contain plain text and/or a combination of replaceable arguments. |
Save |
Click this button to record the changes. |
Delete |
Click this button to delete the currently selected message. |
Make Library |
Click this button to create an application specific message library. This new library will be pre-initialized with the contents of the standard Webster+ system message library. |
To create or edit a message:
Enter the message key and press Tab. If there is an existing message on file for that key, its contents will be displayed; otherwise, the message text area will be cleared. Enter/edit the desired message text and click the Save button to record the changes.
Message library entries can be used to compose the text of messages that will be displayed to the user. There are a couple of ways that you can access the message library. You can use the PxPlus MSG function or the %Webster'Message$ method.
Example 1:
Using the MSG( ) function to obtain the message text:
Text$ = MSG("OnHold")
This would return the text message retrieved from the library. The message in Text$ would contain:
"The client is on hold"
Example 2:
For the next two examples, the variable AccountNo$ contains the value "123456".
Using the MSG( ) function to obtain the message text:
Text$ = MSG("OnHold", AccountNo$)
This would return the text message retrieved from the library and replace the string %1 with the value contained in AccountNo$. The message in Text$ would contain:
"The client 123456 is on hold"
Example 3:
The Webster+ method 'Message$ provides enhanced replacement capabilities. However, instead of replacing parameters by ordinal number (%1, %2, %3, etc.), it replaces values using a variable name.
Using the method 'Message$ to obtain the message text:
Text$ = %Webster'Message$("OnHold" with Acct$=AccountNo$)
This would return the text message retrieved from the library and replace the string %Acct$ with the value contained in AccountNo$. The message in Text$ would contain:
"The client 123456 is on hold"