# Perspective popup, single instance, replace params

**URL:** <https://forum.inductiveautomation.com/t/perspective-popup-single-instance-replace-params/74914>\
**Category:** Ignition\
**Tags:** ignition81, perspective\
**Created:** [June 12, 2023, 5:34pm UTC](https://forum.inductiveautomation.com/t/perspective-popup-single-instance-replace-params/74914 "2023-06-12T17:34:52Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![jlandwerlen](https://avatars.discourse-cdn.com/v4/letter/j/bc8723/32.png) [@jlandwerlen](https://forum.inductiveautomation.com/u/jlandwerlen)\
**Post date:** [June 12, 2023, 5:34pm UTC](https://forum.inductiveautomation.com/t/perspective-popup-single-instance-replace-params/74914/1 "2023-06-12T17:34:52Z")

</div>

Typically I send popups a unique Id so I can open multiple instances. This time I only want to open a single instance (Id is the same) each time I call it, but I want the passed params to update. I'm not seeing this happen. If I call the popup, the params are correct, if I call again with a different set of params, they don't change, they remain as-is. If I close the popup and open using the command from the last call it works.

I placed a change script on the params and they aren't changing.

What am I missing on this? I was under the impression that if you open a popup with the same Id it will close the old one and open a new one.

8.1.28

@cmallonee any ideas? You stated the typical behavior in this post. If I close the popup before I open, the params do update, but the the popup opens center view which isn't quite desirable. The use case here is a popup with a tag browser component that is used to update a text field with a tag path, opening and closing the same popup for each text field is weird, having the tag browser in the same view and not as a popup isn't desired either.

> [@Multiple Popups](https://forum.inductiveautomation.com/t/multiple-popups/73763/5):
>
> The Id you assign when you open the popup must be unique, otherwise, it will only allow a single instance. There are several posts that discuss this, [https://forum.inductiveautomation.com/search?q=perspective%20multiple%20popup](https://forum.inductiveautomation.com/search?q=perspective%20multiple%20popup)

---

<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:** [June 12, 2023, 6:40pm UTC](https://forum.inductiveautomation.com/t/perspective-popup-single-instance-replace-params/74914/2 "2023-06-12T18:40:39Z")

</div>

I must not have had my coffee that day. I've edited that post to reflect that my words could not be trusted there. I will feel shame for the rest of the week.

I verified our expected behavior within the testing suite:

```auto
def test_open_popup_does_not_open_popups_with_duplicate_ids

```

If you open a popup with an ID of "MYCOOLPOPUP", it gets opened with the supplied params. If you open a popup with the same ID, we look to see if a popup with that ID is open. If we determine a popup with that ID is already open, we don't "re-open" the popup - we ignore the request.

If your goal is to update params, it seems like you'd be better suited using custom Session properties.

---

<div class="post-metadata">

**Author:** ![jlandwerlen](https://avatars.discourse-cdn.com/v4/letter/j/bc8723/32.png) [@jlandwerlen](https://forum.inductiveautomation.com/u/jlandwerlen)\
**Post date:** [June 12, 2023, 8:27pm UTC](https://forum.inductiveautomation.com/t/perspective-popup-single-instance-replace-params/74914/3 "2023-06-12T20:27:24Z")

</div>

I ended up using a message, let me know if this sounds silly. It does seem to work very well.

I had a `params` property, I added a `custom` property of the same name. When I open the popup I use `params`, since a message wouldn't do much good as it's not open yet. I have a change script on `params` that copies to the `custom` prop. The message handler updates the `custom` prop and anything within the view uses the `custom` prop.

![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/7/8/78f82a1192295f6a99be9904eec9e93ee27e5daf.png)
