:SEND_MSG
Script Statement: This statement is used to send messages to the user who is logged on to the Automic Web Interface.
Syntax
:SEND_MSG Name, Department, Message
Syntax |
Description/Format |
---|---|
Name |
Name of the user who has logged on to the Automic Web Interface and should receive the
message. You can use * and ? wildcard characters. Use * for any character, or ? for exactly one character. |
Department |
Department of the user who has logged on to the Automic Web Interface and should receive
the message. The wildcard characters "*" and "?" can be used. "*" stands for any character, "?" for exactly one. |
Message |
Message that should be sent. |
This script statement can be used to send messages to users. These messages are then displayed in these users' Messages pane.
Error "20698" occurs if the indicated user does not exist.
Tips:
- Use SYS_USER_ALIVE to check the status of users. SEND_MSG only sends messages to users who are logged on to the Automic Web Interface.
- Use the :ON_ERROR script statement to define action to take if the message fails.
Sent messages are logged and listed in the system control's message category. The message type is "Information" and the message category is "Message".
Warning! Note that sent messages can only be displayed if the Automic Web Interface option "Display error messages and warnings only" is not active.
Note: You can use the privilege "View all messages from own client" in order to have messages displayed that are sent to other users.
More information
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 has not logged on.
: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 and a script variable for the message.
:SET &MSG# = "Please start backup
routine!"
:SEND_MSG "BROWN",SYS_USER_DEP(),&MSG#
The next example uses wildcard characters in order to send the message to all users of the IT department .
:SEND_MSG "*","IT","Please start backup routine!"
See also: