Alarm Table Filter Script

Why not use the built-in priority filters ?

image

About your issue: You're comparing a priority object with a string. This will not work.
Two solutions here:

  • get the string value of the priority (or its int value):
alarmEvent.priority.toString() == "Critical"
alarmEvent.priority.intValue() == 4
  • use the class attributes (I suggest using this):
alarmEvent.priority == alarmEvent.priority.Critical

example I ran in a script console:

data = system.alarm.queryStatus()

priority = data[0].priority

priority.toString() == "High"
priority.intValue >= 2
priority < data[0].priority.Critical

True
True
True

Note: You can use the >, >=, <= and < operators too when using the int value or the class attributes.