New to Ignition here in these recent couple weeks, and I’m at a loss for ideas as to why my power table suddenly stopped allowing me to right click it, when it’s the same as two others in different windows, and the windows are also largely the same with the same references (the other two allow me to right click them).
What’s supposed to happen is you right click anywhere in the table and it brings up an option to export to spreadsheet (xls format). I know, however, that specifically, the code for exporting to excel itself works because I also have that inside a button to the side. For some reason, the small popup won’t appear at all.
Here is the code I have in the Script Editor in the Mouse Release event for the Power Table:
def exportXLS(event): from java.util import Date tableName = event.source.parent.getComponent('TableName').text now = Date() date = system.db.dateFormat(now,"MM-dd-yyyy") file = tableName + " " + date data = event.source.data dataCol = data.getColumnName(0) noInfo = "No information found." if(dataCol == noInfo): system.gui.messageBox("There is no information to export!","Export Failed") else: system.dataset.exportExcel(file,True,data) menu = system.gui.createPopupMenu(["Export to Spreadsheet"], [exportXLS]) menu.show(event)
A little stumped here, and any help/suggestions are appreciated.