Unable to get ack user name in AES screen

Discussions about product bugs & problems!
Note: This is no replacement for the Official ETM Support!
Search

Post Reply
5 posts • Page 1 of 1
User avatar
adaneau
Posts: 310
Joined: Tue Feb 21, 2012 9:49 am

Unable to get ack user name in AES screen

Post by adaneau »

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

User avatar
leoknipp
Posts: 2926
Joined: Tue Aug 24, 2010 7:28 pm

Re: Unable to get ack user name in AES screen

Post by leoknipp »

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

Gertjan van Schijndel
Posts: 634
Joined: Mon Aug 02, 2010 10:37 am

Re: Unable to get ack user name in AES screen

Post by Gertjan van Schijndel »

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.

User avatar
aorange
Posts: 147
Joined: Thu Nov 04, 2010 10:07 am

Re: Unable to get ack user name in AES screen

Post by aorange »

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

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]);

Gertjan van Schijndel
Posts: 634
Joined: Mon Aug 02, 2010 10:37 am

Re: Unable to get ack user name in AES screen

Post by Gertjan van Schijndel »

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.

Post Reply
5 posts • Page 1 of 1