Ignition Perspective Component Event Script Issue

I'm trying to close a popup window after a query has been executed. The query executes fine, but the popup never closes. No error is given. I have even tried to use system.perspective.closePopup() with no id specified. As well as with an ID specified. Attached is my script

def runAction(self, event):
	serial = self.getSibling("TextField").props.text
	pile = self.session.custom.PileClicked
	user = self.session.props.auth.user.userName
	params = {'Serial':serial, 'Pile': pile, 'user':user}
	system.db.runNamedQuery('Press_Infeed/Add_Door', params)
	
	system.perspective.closePopup(id = 'Add_Door')

I had an issue with the named query being an 'select' rather than an 'update'. Therefore since no result set was given the script never went through.

1 Like