:SEND_MSG
Use the :SEND_MSG script statement to send messages to the user who is logged in to the Automic Web Interface. These messages are displayed in the Messages pane of the particular user. The message type is Information, and the message category is Message.
Important Considerations
Keep the following rules and behaviors in mind when using this script statement:
- Make sure that the Error messages and warnings only setting in the Messages pane is not checked as otherwise, sent messages are not displayed.
- Activate the View all messages from accorded client privilege to have messages displayed that are sent to other users.
- Use SYS_USER_ALIVE to check the status of users. SEND_MSG only sends messages to users who are logged in to the Automic Web Interface.
- If the indicated user does not exist, error 20698 occurs. You can use the :ON_ERROR script statement to define the action that should be taken if the message fails.
More information:
Syntax
:SEND_MSG Name, Department, Message
Parameters
| Parameter | Description | Format |
|---|---|---|
| Name | Name of the user who is logged in to the AWI and who should receive the message. You can use the "*" and "?" wildcard characters where "*" stands for any character, and "?" for exactly one character. | Script literal, script variable, or script function |
| Department | Department of the user who has logged on to the Automic Web Interface and should receive the message. You can use the "*" and "?" wildcard characters where "*" stands for any character, and "?" for exactly one character. | Script literal, script variable, or script function |
| Message | Message that should be sent. | Script literal, script variable, or script function |
Examples
User Brown from the IT department has logged on to the Automic Web Interface and is requested to start the backup routine. A Notification object starts if this user is not logged in:
: SET &RET# = SYS_USER_ALIVE("BROWN", "IT")
:IF &RET# = "Y"
:SEND_MSG "BROWN", "IT", "Please start backup routine!"
:ELSE
:SET &ACTOBJ# = ACTIVATE_UC_OBJECT(CALL, "DAY_SHIFT")
:ENDIF
In the following example, the user receives the same message as shown in the above example. A script function is used for the Department parameter and a script variable is used for the Message parameter:
: SET &MSG# = "Please start backup routine!"
:SEND_MSG "BROWN", SYS_USER_DEP(), &MSG#
The following example uses wildcard characters to send the message to all users of the IT department:
:SEND_MSG "*", "IT", "Please start backup routine!"
See also: