Perspective popup, single instance, replace params

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.


@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.

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:

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.

1 Like

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.