Alarm Status Table and Alarm Journal Components

Two items relating to alarms:

  1. Since there is no way to export the visible dataset of the Alarm Journal component, I am using the system.alarm.queryJournal function but the called dataset is not showing the columns we need. (i.e. acked by, ack notes, alarm name, etc…) Any way to include these columns in the dataset?

range = event.source.parent.getComponent(‘Date Range’)
table = system.alarm.queryJournal(journalName=‘Journal’, startDate = range.startDate, endDate = range.endDate, includeSystem=True, includeData=True)
filePath = system.dataset.exportExcel(“data.xls”, 1, table.getDataset())
if filePath != None:
system.net.openURL(“file://”+filePath)

  1. Is there a way to configure the Alarm Status Table component to reference a dataset of selectable acknowledgement choices rather than using the text area?

Thanks,
Ben

Ben,

Did you ever find a solution to this? We are in the same situation.

Thanks

It should be stored in the alarm_event_data table. There were some earlier issues with this as descibe in this thread:

Below is the solution I ended up using for this:

from com.inductiveautomation.ignition.common.alarming.config import CommonAlarmProperties

range = event.source.parent.getComponent(‘Date Range’)
table = system.alarm.queryJournal(journalName=‘Journal’, startDate = range.startDate, endDate = range.endDate, includeSystem=True, includeData=True)

ackUserData = []
for row in table:
ackUserData.append(str(row.get(CommonAlarmProperties.AckUserName)))
ackNotes = []
for row in table:
ackNotes.append(str(row.get(CommonAlarmProperties.AckNotes)))
nameData = []
for row in table:
nameData.append(str(row.get(CommonAlarmProperties.Name)))

tableData = table.getDataset()
tableData = system.dataset.addColumn(tableData,ackUserData,‘Ack User’,type(str()))
tableData = system.dataset.addColumn(tableData,ackNotes,‘Ack Notes’,type(str()))
tableData = system.dataset.addColumn(tableData,nameData,‘Label’,type(str()))

filePath = system.dataset.exportExcel(“data.xls”, 1, tableData)
if filePath != None:
system.net.openURL(“file://”+filePath)

1 Like

Thanks, That’s the route I was going down. Appreciate your fast response.