Is it possible to make it so that a popup window closes the previous opened popup if you open a new one? I wish to create a process overview with component data where if you click on a component, a popup opens at a set X and Y coordinate. This works well already but I noticed that if you open the popup for multiple components the previous ones stay open which seems un-necessary for this form of application.
Is there a way to either “overwrite” the opened popup or to close all other popups when opening a new one? What would be the best way to solve this in that case.
This is for Perspective by the way and not vision.
If all your popups for that component have the same id, I’m pretty sure you could just run 2 events. The first one closes the popup, the second one opens the same popup. That way if there is a popup open already with that id, it will close first, and then you would be able to open your new popup.
Another option is for the popups to have a messageHandler that closes them. Then in your button that opens a new popup, you first send a message which will close all the popups, and then open your new one.
I tried this solution and will probably use it. It seems to work pretty well for my use.
I put a “Close” popup event on the button down and an “Open” popup event on the OnClick where I pass parameters in the Open and pass nothing except for the same ID in the Close. Works well enough for what I need!
I tried having both the close and open event on the same Event Action but it did not work as intended so I think I will go with the OnClick and MouseDown events.
Thanks for the help Daniel!