I am getting this error when I try to get the value of current alarm status based on some filter using system.alarm.queryStatus function. Is there any way to convert Java string result into normal text/string?
Script Starts
props = [(“Group”, “=”, “Plant A”)]
state = [“ClearUnacked”, “ActiveUnacked”, “ActiveAcked”]
priority = [1,2,3,4]
lblState = “”
lblPriority = 0
numState = 0
c_alarms = system.alarm.queryStatus(any_properties = props, state = state,priority = ‘Critical’)
h_alarms = system.alarm.queryStatus(any_properties = props, state = state,priority = ‘High’)
m_alarms = system.alarm.queryStatus(any_properties = props, state = state,priority = ‘Medium’)
l_alarms = system.alarm.queryStatus(any_properties = props, state = state,priority = ‘Low’)
if len(m_alarms) > 0:
j=1
for m_alarm in m_alarms:
lblState = m_alarm.state
lblPriority = 2
break
event.source.parent.getComponent(‘lblState’).text = lblState
event.source.parent.getComponent(‘numlblPriority’).value = lblPriority
Script Ends
I am getting this error for lblState