# Popup event to run script

**URL:** <https://forum.inductiveautomation.com/t/popup-event-to-run-script/73915>\
**Category:** Ignition\
**Tags:** perspective\
**Created:** [May 18, 2023, 5:57pm UTC](https://forum.inductiveautomation.com/t/popup-event-to-run-script/73915 "2023-05-18T17:57:41Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Siebold](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/siebold/32/47336_2.png) [@Siebold](https://forum.inductiveautomation.com/u/Siebold)\
**Post date:** [May 18, 2023, 5:57pm UTC](https://forum.inductiveautomation.com/t/popup-event-to-run-script/73915/1 "2023-05-18T17:57:41Z")

</div>

I am trying to have a script trigger when a popup appears that calls a namedquery and filles in some text boxes with the results. I can't find an event that fires everytime the popup is opened up. Any ideas?

---

<div class="post-metadata">

**Author:** ![cmallonee](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/cmallonee/32/6416_2.png) [@cmallonee](https://forum.inductiveautomation.com/u/cmallonee)\
**Post date:** [May 18, 2023, 6:06pm UTC](https://forum.inductiveautomation.com/t/popup-event-to-run-script/73915/2 "2023-05-18T18:06:38Z")

</div>

For the View which is used inside of the Popup, right-click the View node in the Project Browser panel and select the `onStartup` Event.

---

<div class="post-metadata">

**Author:** ![dkhayes117](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/dkhayes117/32/68344_2.png) [@dkhayes117](https://forum.inductiveautomation.com/u/dkhayes117)\
**Post date:** [May 18, 2023, 6:09pm UTC](https://forum.inductiveautomation.com/t/popup-event-to-run-script/73915/3 "2023-05-18T18:09:56Z")

</div>

Another way would be to create a custom property on the popup and use a named query binding. Then bind the text boxes to that property using a lookup expression.
