LESSON

Parameterized Popup Window and UDTs

Description

Learn how to pass in entire UDTs into a popup window to take advantage of all of the Tags inside of the UDT at once.

Video recorded using: Ignition 7.7

Transcript

(open in window)

[00:00] When passing parameters into popup windows, it is possible to pass the entire UDT into the window. By passing the entire UDT, you have every single value available to you that is inside the UDT. So take this example here. I have a data type created called tank. Here I have a tank detail popup window. On the root container, I can right click, go down to customizers, custom properties, and I've added a property here called tank. The data type is the tank data type. So I don't have to use any standard type. I can actually use one of the user defined types we created in the Tag browser. So I used the tank one here. By using that type, I have every single property available to me. So I go down here to the bottom left, under the custom properties I'll see the tank, I click on the magnifying glass, I'll see all the properties or tags inside of that UDT. So I have HOA available to me, level_Pv, temp_Pv etc. I can then bind things inside the window to parts of that UDT. So for example my HOA control, I bound the control value to the HOA property of the tank UDT. So I've done it bidirectional there. So by using the entire UDT, I have all the properties available to me. It makes it very easy when configuring this pop up window. Now of course we have to be able to pass the UDT into this window. So a great place to do that from would be the actual template. So here I have a tank template, the tank template is also using the exact same custom property. So here I have a tank and the data type is tank. I can take that same custom property and pass it into the pop up window. So here on the script for my template. You can see that when I press on it it's going to open and center the tank detail window and it's pass into the tank parameter. The tank of this template. So if I click on the link you'll see it's going to the tank of the template here. So I'm taking the exact same UDT that's in the template, passing it into the pop up window. So if I look at this in a run time. If I look at tank one hundred. You'll see it passes the entire UDT into the popup window. I can then see that inside here and use it for various places.

You are editing this transcript.

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

close

Share this video