# Webster+ Message Library Maintenance

> Source: https://manual.pvxplus.com/webster/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:

![](https://manual.pvxplus.com/migration-assets/d746aba93bad1b4b6db5e215744f01353206b2b03647f58c2cbed52c30a69896.jpg)

Important Note:

*\*webster/msglib.en* is the standard system message library used by Webster+; therefore, adding application-specific messages to this library is *not* recommended because it will be overwritten with subsequent upgrades.

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.<br>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.

## Using the Message Library in your application

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](https://manual.pvxplus.com/functions/msg)** function or the **[%Webster'Message$](https://manual.pvxplus.com/webster/webster-object-methods#message)** method.

***Example 1:***

![client_on_hold](https://manual.pvxplus.com/migration-assets/3aa7da6989a0ba8e667b0f63ddb3859a5125c7c2ca535b9240eb65fd4f812d3a.png)

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".

![](https://manual.pvxplus.com/migration-assets/ea1a1c9c0a2f7e7ae6548fc3e0f6d92b98a4cafa0bcd06fa8e28e333601a3bb0.jpg)

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.

![client_on_hold_3](https://manual.pvxplus.com/migration-assets/b171014a2e8e510b79d78b062da50e3d84b600c3e606df2021c42970e89c4efc.png)

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"

Note:  
The %Acct$ in the sample message text above should not be confused with a global variable. The leading % simply identifies the variable to be replaced and is designed to be consistent with the numbered parameters %1, $2, %3, etc.
