Column zero of the journal table model will always be the event ID regardless of how the user has arranged the journal table. Therefore, you could do something like this:
eventID = model.getValueAt(row, 0)
prop = [("EventId","=", eventID)]
alarmArray = system.alarm.queryJournal(all_properties = prop)
alarm = alarmArray[0]
What is returned by the journal query will actually be an iterable array. However, since in this example, you've structured your query in a way that will only return one result, you can immediately access the alarm object by adding [0]
to the end of the array. In this regard, queryJournal and queryStatus both work the same.
Once you have the alarm object you an access any of the properties with the following map:
ackNotes = alarm.getOrElse('ackNotes', None)
ackTime = alarm.getOrElse('eventTime', None) if alarm.acked else None
ackedBy = alarm.getOrElse('ackUser', None)
activePipeline = alarm.getOrElse('activePipeline', None)
clearedPipeline = alarm.getOrElse('clearPipeline', None)
ackPipeline = alarm.getOrElse('ackPipeline', None)
activeTime = alarm.getOrElse('activeTime', None)
clearTime = alarm.getOrElse('clearTime', None)
eventValue = alarm.getOrElse('eventValue', None)
deadBand = alarm.getOrElse('deadband', None)
displayPath = alarm.displayPath #This also Works:.getDisplayPath() AND This also works: .getOrElse('displayPath', None)
acked = alarm.acked #This also works: .getOrElse('isAcked', None)
active = alarm.getOrElse('isActive', None) #In my experimentation, .active didn't work
clear = alarm.cleared #This also works: .getOrElse('isClear', None)
name = alarm.name #This also works.getName() AND This also works: .getOrElse('name', None)
notes = alarm.notes #This also works: .getNotes() AND This also works: .getOrElse('notes', None)
priority = alarm.priority #This also works: .getPriority() AND This also works:.getOrElse('priority', None)
sourcePath = alarm.source #This also works: getSource() AND This also works: .getOrElse('source', None)
currentState = alarm.state #This also works: .getState() #The following DID NOT return the expected result: .getOrElse('eventState', None)
eventID = alarm.id #This also works: .getID()
unacknowledgedDuration = alarm.getOrElse('ackDuration', None)
activeDuration = alarm.getOrElse('activeDuration', None)
label = alarm.label
Note, if you have structured your alarm query in a way that will return more than one result, you will need to iterate through it to get all of the alarm objects.
Example:
for alarm in alarmArray:
alarmObject = alarmArray[alarm]