Display Acknowledgement Notes in Alarm Status Table

I was experimenting on Vision's Alarm Status Table, and I ran across an interesting result that could be useful to somebody, so I am sharing it here.

When adding an unspecified column to the table, the column model defaults to acknowledgement notes. Here is the code:

jideTable = event.source.parent.getComponent('Alarm Status Table').getComponent(0).getComponent(0).getComponent(1).getComponent(0).getComponent(0).getComponent(0)
from javax.swing.table import TableColumn
tableHeaders= jideTable.getTableHeader()
columnModel = jideTable.getColumnModel()
columnModel.addColumn(TableColumn())
tableColumn = columnModel.getColumn(6)
tableColumn.setHeaderValue("Ack Notes")
tableHeaders.repaint()

Here is the result:

I assume this is because when sortable is set to false, and all the columns are rendered, acknowledgement notes become column 0:

jideTable = event.source.parent.getComponent('Alarm Status Table').getComponent(0).getComponent(0).getComponent(1).getComponent(0).getComponent(0).getComponent(0)
jideTable.setSortable(False)

Result:

Hello justinedwards.jle,

To help display the different columns in the Alarm Status Table, you can right click the table headers and check the boxes to display/reveal the other available columns. The 1st column is the Ack-Notes as you have found.

https://docs.inductiveautomation.com/display/DOC81/Vision+-+Alarm+Status+Table

1 Like

Thanks, I have actually since figured that out and even noted it here:

For dynamically controlling which columns are shown or hidden with scripting, I have since learned that any integer from 0 to 22 can be passed into the addColumn method, and the column added will directly correspond to the order of the columns listed in the popup, even if the table has been rearranged.

What I was working on at the time, and still haven't figured out how to do is altering the table model to accept columns that are not on that dropdown list.

1 Like