notificationBar_newMsg()
The function creates a new notification messages for the wizard.
Synopsis
void notificationBar_newMsg(string sCatName, string sKey, int iPrio, string sErrCode, dyn_anytype daParams, bool bSettings_ShowInLog, dsMsgDps, bool bShowInAllPanels, bool bForceMessage);
Parameter
Parameter | Description |
---|---|
sCatName | Catalog name for the notification: wincc_oa_path/msg/[language]/[Catalog] |
sKey | Catalog keyword: wincc_oa_path/msg/[language]/[Catalog] |
iPrio | Notification priority Following Priorities can be used:
|
sErrCode | Error code in the defined message catalog. If no code is stated, _errors.cat is used by default. This setting applies only for the output in the log viewer. |
daParams | Parameter for the variables used inside the text messages. Several dollar parameters can be used. makeDynAnytype("createdID")); Creates a dollar parameter "createdID". makedynstring(s1, s2, s3); //creates 3 dollar parameters s1,s2,s3 |
bSettings_ShowInLog | Defines if the message is displayed in the log viewer. Default = FALSE. Optional parameter. |
dsMsgDps | List of message data points where the message is written, user name or wizard prefix may be defined here. |
bShowInAllPanels | Defines if the message is displayed for all panels (TRUE) (If the notification bar is used in several panels) or only in the panel where the message has been created (FALSE; default) This parameter only applies if the function has been called inside a UI. Optional parameter. |
bForceMessage | Defines if the message is forced to the UI and is therefore always displayed (TRUE) or if the messages may be filtered out inside the UI due to lower priority (FALSE; default). Optional parameter. |
Return Value
-
Error
-
Description
A new message is created for the notification bar and is saved in the notification data point. Use the function to display messages in the in a wizard or to display messages in your panels by adding the notificationBar reference to your panels.
You can find the NotificationBar under wincc_oa_path/panels/objects_parts/STD_OBJECTS.
In order to specify the dollar parameters, double-click the reference. The dollar parameter window is opened.
Parameter | Description |
---|---|
$bExpandable | Defines whether the arrow symbol is shown in the notificationBar or not. If you set this dollar parameter to TRUE, the three last messages are shown in the notificationBar via the arrow symbol. |
$FitToPanel | If this parameter is set to TRUE, the width of the notificationBar is adapted to the width of the panel. |
$bRootPanel | Must be set to TRUE. Specifies that messages are shown in a root panel. For child panels the messages are only shown if the messages are also created in a child panel. |
$dsAddDps | Specify here the data points for the notificationBar. The data points are automatically created. CAUTION: you need the appropriate authorization level in order to create data points (authorization level: administration). |
Example
Following example creates a new message for the notification bar. The message is an error message (NOTIFICATION_BAR_PRIO_ERROR) from the catalog "cnsEditor" with the keyword "cnsEditor_nodeExist". An error code is not used. The string "createdID" is used in the message.
#uses "notificationBar.ctl"
main()
{
notificationBar_newMsg("cnsEditor", "cnsEditor_nodeExist",
NOTIFICATION_BAR_PRIO_ERROR, WF_ERR_NOTHING,
makeDynAnytype((string)"createdID"));
}
Assignment
Wizard Framework - Notification Bar
Availability
UI, CTRL