LESSON

Popup Window - Multiple Instances

Description

By default Ignition only opens a single copy of each window in the client. Learn how to open multiple copies (or instances) of the window in the client.

Video recorded using: Ignition 7.8

Transcript

(open in window)

[00:00] By default, the client only opens the single instance or copy of a pop up window. But we can change this behavior. I have four tanks here in my client, If I click on any one of these tanks, I get a little pop up window that gives me some additional information on the tank. If I take a look at my windows menu here, we can see that there are three windows open, navigation, pop up and tank overview. Now if I click on a different tank, say tank 101 over here, you can see that the pop up window is now looking at tank 101, but there's still only three windows open. What's happening is that clicking on different tanks reopens the pop up window, it passes new parameters into this pop up window instance here. This is the default behavior because we want to try to limit the number of open windows in the client. Next, let's take a look at how we can change this behavior and have multiple instances of the same window open at the same time. I'll close my pop up window and I'll head back to my designer. You see that I'm looking at my tank template here and it has a script on the template so we'll take a look at the script. We'll right click, go down to scripting, and we see the script here on the open action is opening the pop ups, pop up window and it's passing some tank UDT parameters over. Now to make this script open an additional instances of the pop up window, we need to check this additional instances checkbox here. This is something that was added in 7-8-0. This just tells the script that instead of using the same pop up window, go ahead and open up a new instance if there's one already open. So click ok. And I'll save and publish the project. Now let's take a look at the client one more time. I'll go ahead and bring that back up. We need to update our client here. So I'll go ahead and do that right now. And let's test this out. So I'll start clicking on my tank templates. And you'll see there's multiple instances of that same pop up just looking at each different tank. If I take a look at the windows menu, we see that each of the pop up window instances are listed and keep doing this as many times as I like.

You are editing this transcript.

Make any corrections to improve this transcript. We'll review any changes before posting them.