I am trying to use the filteralarm script to have our alarm status table show acknowledged alarms that have been acknowledged for less than 12 hours.
Using the IsAcked, AckTime, and other scripting functions I came up with this:
site = alarmEvent.get(“Site”)
first = system.date.now()
second = alarmEvent.get(“AckTime”)
ACKED = alarmEvent.get(“IsAcked”)
TIME = system.date.hoursbetween(first, second)
tagname = “[Client]” + site + “AlarmFilter”
FilterFlag = system.tag.read(tagname)
if TIME.value <= 12 and ACKED == True or FilterFlag.value == True:
return True
return False
Seems like the filterflag is working, but it is not showing the acknowledged alarms that have been acknowledged less than 12 hours.
Any ideas?