# Template Script Reference Stuck at Original Setting

**URL:** <https://forum.inductiveautomation.com/t/template-script-reference-stuck-at-original-setting/67099>\
**Category:** Ignition\
**Created:** [November 30, 2022, 6:07pm UTC](https://forum.inductiveautomation.com/t/template-script-reference-stuck-at-original-setting/67099 "2022-11-30T18:07:28Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jeremiah\_Brown1](https://avatars.discourse-cdn.com/v4/letter/j/65b543/32.png) [@Jeremiah\_Brown1](https://forum.inductiveautomation.com/u/Jeremiah_Brown1)\
**Post date:** [November 30, 2022, 6:07pm UTC](https://forum.inductiveautomation.com/t/template-script-reference-stuck-at-original-setting/67099/1 "2022-11-30T18:07:28Z")

</div>

Hello,

I have a template with a script to launch a popup Window. Originally it was set to open a popup window named Analog Input. However, it has been changed (as can be seen in screenshot) to open a popup window named MS\_AIn. No matter how many times I change this setting, restart the designer or Ignition gateway, etc, I can't get this setting to change. I made a new template to test launching popups to make sure I wasn't missing something obvious and have no issues changing which popup the new template launches.

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/b/4/b4b700b6eb69035f9d5206d46cc68356ffbdd156.png)

Thanks,  
Jeremiah

---

<div class="post-metadata">

**Author:** ![paul-griffith](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paul-griffith/32/37249_2.png) [@paul-griffith](https://forum.inductiveautomation.com/u/paul-griffith)\
**Post date:** [November 30, 2022, 6:26pm UTC](https://forum.inductiveautomation.com/t/template-script-reference-stuck-at-original-setting/67099/2 "2022-11-30T18:26:14Z")

</div>

Go to the "Script Editor" tab and change it manually.

---

<div class="post-metadata">

**Author:** ![Jeremiah\_Brown1](https://avatars.discourse-cdn.com/v4/letter/j/65b543/32.png) [@Jeremiah\_Brown1](https://forum.inductiveautomation.com/u/Jeremiah_Brown1)\
**Post date:** [November 30, 2022, 7:30pm UTC](https://forum.inductiveautomation.com/t/template-script-reference-stuck-at-original-setting/67099/3 "2022-11-30T19:30:11Z")

</div>

Script editor shows it pointing to the correct popup window but it still tries to open the original value that was entered.

param1 = event.source.AnalogInst

window = system.nav.openWindow('Popups/MS\_AIn', {'AnalogInst' : param1})  
system.nav.centerWindow(window)

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [November 30, 2022, 7:41pm UTC](https://forum.inductiveautomation.com/t/template-script-reference-stuck-at-original-setting/67099/4 "2022-11-30T19:41:47Z")

</div>

This sort of thing usually means the component firing the event is not the one you think. Look at the template _ **instance** _ and see if it has this event defined. Make sure that instance has a name different from the template itself, so you can see a difference in the first tab of the error popup. Also, add some blank lines in the script so the `.openWindow()` call isn't on line #9, so you can see if the error follows the new line number.

---

<div class="post-metadata">

**Author:** ![Jeremiah\_Brown1](https://avatars.discourse-cdn.com/v4/letter/j/65b543/32.png) [@Jeremiah\_Brown1](https://forum.inductiveautomation.com/u/Jeremiah_Brown1)\
**Post date:** [November 30, 2022, 7:56pm UTC](https://forum.inductiveautomation.com/t/template-script-reference-stuck-at-original-setting/67099/5 "2022-11-30T19:56:45Z")

</div>

I kept looking at the script on the window but it was the script of the object in the window that was launching the popup. Thank you!
