How can I open a popup from another popup

Hello I am designing popup faceplates and I want to open a popup from another popup. What is the best way to do it?

If you are trying to open another instance of the same popup window but with different parameter values you want to use system.nav.openWindowInstance, otherwise just use system.nav.openWindow.

What is supposed to control when this other popup appears? User interaction with a button?

I have a motor faceplate and there is a button that when you press it opens another popup that shows the inhibit conditions for that motor.
It is not the same popup opening twice.

Use system.nav.openWindow in the button's onActionPerformed script.

Hello guys,

I am working with Nikzitronik on the same project.The motor popup takes all data dynamically from a Motor UDT. The problem occurs when we try to open an additional and separate pop up for each motor. The name of the new pop up has the name of the pump as this information is present in the UDT and can be used to dynamically open the new window. So we use system.nav.openWindow with the path of the folder of new pop ups \ (dynamic name) but it doesn’t work. Any ideas?

If you are opening multiple of the same base popup window then you need to use system.nav.openWindowInstance

Ryan thanks for the feedback.

system.nav.openWindowInstance passes the parameters to the new PopUp so that it opens dynamically, but the new PopUp has no parameters. It's a different PopUp window for every Pump.

Problem solved.

It was easier than i thought. (I am not familiar with python :roll_eyes:)

I used system.nav.openWindow( 'path of second windows' + dynamic name of every second PopUp)

Glad to hear that you managed to figure it out.

Unless each popup contains something wildly different from the others you should be able to make 1 or 2 generic popups, and then pass the pump name to the popup to create an indirect binding to the associated pump UDT members/tags.

4 Likes

100% this.

Also... don't embed a UDT Tag in a popup. Or indirectly bind the entire UDT.

Use indirect bindings for each member of the UDT that is needed for the popup, based on a string tag path provided to the popup.

4 Likes