# Ignition Perspective Component Event Script Issue

**URL:** <https://forum.inductiveautomation.com/t/ignition-perspective-component-event-script-issue/83441>\
**Category:** Ignition\
**Tags:** perspective, scripting\
**Created:** [December 21, 2023, 7:16pm UTC](https://forum.inductiveautomation.com/t/ignition-perspective-component-event-script-issue/83441 "2023-12-21T19:16:35Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Nicholas\_Houston](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/nicholas_houston/32/68700_2.png) [@Nicholas\_Houston](https://forum.inductiveautomation.com/u/Nicholas_Houston)\
**Post date:** [December 21, 2023, 7:16pm UTC](https://forum.inductiveautomation.com/t/ignition-perspective-component-event-script-issue/83441/1 "2023-12-21T19:16:35Z")

</div>

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

```auto
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')

```

---

<div class="post-metadata">

**Author:** ![Nicholas\_Houston](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/nicholas_houston/32/68700_2.png) [@Nicholas\_Houston](https://forum.inductiveautomation.com/u/Nicholas_Houston)\
**Post date:** [December 21, 2023, 7:55pm UTC](https://forum.inductiveautomation.com/t/ignition-perspective-component-event-script-issue/83441/2 "2023-12-21T19:55:45Z")

</div>

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.
