How can I access toolbars buttons in PG2 displays? Security inside PG2
Here our customer asked us to enable audible alarms, however the silence button is not fiting in operator workplace because we don't have any shurtcut in application bar, only the "Audible Alarms Toobar" - in other words, application bar was disabled until we need to show tool collections.
So we want to put this silence button in PG2 display, is it possible? I've tried to use a
"Aspect View Wrapper" and "Verb button" but I didn't get successful.
Another question, for example: I have 2 buttons in the same PG2 display but the first one can be operate (read) by users "group 1" and the second can be operate (read) by users "group 2". Is it possible to restrict it in the enable property using the current user value?
Voted best answer
There is a problem with that kind of workplace you seems to run. The code for executing audible alarms is built in that toolbar with the buttom included. If that toolbar is not placed on the screen audible alarm is not possible to use.
Best Regards // Mattias, AB Tändkulan Sweden
Afaik, you must place the audible alarm icon in some toolbar to get audible alarms in the workplace. I'm not aware of any possibility to put it inside some wrapper.
Starting with version 5.1 FP4 you can now access the current user name, account name and role(s) from within a PG2 expression using the new UserAccountName(), UserFullName() and UserRoles() functions.
However, I suggest that you use Security Definitions instead, you can easily find out if you have e.g. "Operate" on some object of your choice by checking if you can write on a property on that object or the Alarm Global Properties:IsAlarmUnack - just type a hash (#) character after the property to display subproperties, e.g. "IsWritable".