Anyone have an example on how to do alarming similar to RSView. I can get the tag to trigger in a table using the data base browse expression by pointing it to the Alert_Log.
The problem I can’t seem to use a pushbutton to Acknowledge the alarm.
We’ll be adding some easier alarming components very soon for dealing with alarms. Currently the only way to acknowledge an alert is to use the system.alert.acknowledgeAlert function.
Thats what I see. But Anytime I try to use some of the Alert sample code in the Manual. Just by pasting it in the expression window gives me all types of syntax errors - even though the syntax is exactly like the manual.
using the built in Alert_log attached to a mysql database. What should I use on a button?
This is python code and should be entered into the event handlers script, not an expression (though you could using the runScript() function if you wanted to).
To access it, just right-click on the button and select Event Handlers...->action->actionPerformed. Click on the Script Editor tab at the top right of the screen and put your script into the space provided. This script will run every time the button is pressed.
system= "SQLTags.default"
path = "[default]Alm_ESTOP"
stateName = "ALM_STOP"
system.alert.acknowledgeAlert(system, path, stateName)
The example in the help manual is more complicated with a sub function and default values all added in.