# Only open one popup with same parameter

**URL:** <https://forum.inductiveautomation.com/t/only-open-one-popup-with-same-parameter/28766>\
**Category:** Ignition\
**Tags:** ignition79\
**Created:** [October 3, 2019, 3:42am UTC](https://forum.inductiveautomation.com/t/only-open-one-popup-with-same-parameter/28766 "2019-10-03T03:42:55Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Veronica](https://avatars.discourse-cdn.com/v4/letter/v/6a8cbe/32.png) [@Veronica](https://forum.inductiveautomation.com/u/Veronica)\
**Post date:** [October 3, 2019, 3:42am UTC](https://forum.inductiveautomation.com/t/only-open-one-popup-with-same-parameter/28766/1 "2019-10-03T03:42:55Z")

</div>

I am using a popup that shares across a variety number of pumps, so I created a multiple instances of popup.

However, I want to avoid a single pump to popup multiple popups, which means I only want one popup for each pump. Is it possible to do this?

---

<div class="post-metadata">

**Author:** ![Sanderd17](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/sanderd17/32/8735_2.png) [@Sanderd17](https://forum.inductiveautomation.com/u/Sanderd17)\
**Post date:** [October 3, 2019, 6:45am UTC](https://forum.inductiveautomation.com/t/only-open-one-popup-with-same-parameter/28766/2 "2019-10-03T06:45:52Z")

</div>

You can achieve that with scripting.

Below is the code we use for motor popups (found somewhere on the forums, I don’t remember who to credit for it), it gets all open popups, and checks if it’s for the same motor.

```auto
faceplate = 'path/to/popup'

windows = system.gui.getOpenedWindows()
param = self.parent.ST_Motor
found = 0

for win in windows:
	if ((win.path == faceplate ) and (win.rootContainer.ST_Motor.Internal.Info == param.Internal.Info)):
		found = 1
		win.setSelected(1)
		break
	
if not found:
	newPopup = system.nav.openWindowInstance(faceplate , {'ST_Motor' : param})
	system.nav.centerWindow(newPopup)

```
