Hello,
First are my system informations:
Windows 7 SP1
WinCC OA 3.11
I want to display the name of the user who acknowlegde an alarm direct in alarm screen. So i try to follow the help but I just can display the id of the user, not the name. I see this in the help:
userName(): Prints the current user. The name is actually an ID that is automatically converted to a name.
But this function is not in the list of WinCC OA functions in the AES settings. Is there another way to do this? I think it could be done by script but it will be better to have a way to direct display.
Thanks in advance for answers.
Alexandre DANEAU
Unable to get ack user name in AES screen
Search
Re: Unable to get ack user name in AES screen
Hello,
right now there is no standard functionality available to show the username at the AEScreen for the user who has acknowledged an alert.
If such a functionality is required you have to implement an own CTRL-extension which is then loaded by the AEScreen.
For details pleas have a look at the online-help: System Management --> Diagnostics --> Alert an Event panel --> Example of how to add a user-defined column.
The requirement to provide a standard solution to show the ack-user is already known and it is planned for a future version.
Best Regards
Leopold Knipp
Senior Support Specialist
right now there is no standard functionality available to show the username at the AEScreen for the user who has acknowledged an alert.
If such a functionality is required you have to implement an own CTRL-extension which is then loaded by the AEScreen.
For details pleas have a look at the online-help: System Management --> Diagnostics --> Alert an Event panel --> Example of how to add a user-defined column.
The requirement to provide a standard solution to show the ack-user is already known and it is planned for a future version.
Best Regards
Leopold Knipp
Senior Support Specialist
-
- Posts: 634
- Joined: Mon Aug 02, 2010 10:37 am
Re: Unable to get ack user name in AES screen
Also in the Lab is a prototype called 'Store additional alarm information', which you could use to write the ack username to an _add_value column and display this column in your AES screen.
Re: Unable to get ack user name in AES screen
We had a similar requirement and opted for making a small modification to the vision/AS_detail_DP.pnl
we added the code below around line 198 it makes the panel display the full name (stored in the coment) of the user instead of just a username
we added the code below around line 198 it makes the panel display the full name (stored in the coment) of the user instead of just a username
Code: Select all
dyn_string dsComments;
dyn_string dsUserNames;
string sUserFullName;
dpGet("_Users.Comment", dsComments,
"_Users.UserName", dsUserNames);
int intIndex = dynContains(dsUserNames, getUserName(ackUser[i]));
if(intIndex > 0)
sUserFullName = dsComments[intIndex];
else
sUserFullName = getUserName(ackUser[i]);
-
- Posts: 634
- Joined: Mon Aug 02, 2010 10:37 am
Re: Unable to get ack user name in AES screen
When you use "_Users.UserId" instead of "_Users.UserName", you do not need to use the function 'getUserName' in the dynContains call.
Note that for this to work correctly in a distributed environment, the "_Users" datapoints in all systems must have the exact same content, otherwise you might get the wrong username of a remote system.
Note that for this to work correctly in a distributed environment, the "_Users" datapoints in all systems must have the exact same content, otherwise you might get the wrong username of a remote system.