# Use only one window for different components values

**URL:** <https://forum.inductiveautomation.com/t/use-only-one-window-for-different-components-values/68062>\
**Category:** Ignition\
**Tags:** ignition81, vision\
**Created:** [December 29, 2022, 12:21pm UTC](https://forum.inductiveautomation.com/t/use-only-one-window-for-different-components-values/68062 "2022-12-29T12:21:08Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![Leandro\_Garcia\_Carva](https://avatars.discourse-cdn.com/v4/letter/l/6f9a4e/32.png) [@Leandro\_Garcia\_Carva](https://forum.inductiveautomation.com/u/Leandro_Garcia_Carva)\
**Post date:** [December 29, 2022, 12:21pm UTC](https://forum.inductiveautomation.com/t/use-only-one-window-for-different-components-values/68062/1 "2022-12-29T12:21:08Z")

</div>

Hi, I want to use only one screen and change the values depending the button clicked on the other window.  
Check the image below:  
In this window there are 5 buttons.  
 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/b/b/bb6a8802bb1f16d928cd2fac9c007e816fa7d169.png)  
This buttons calling five different windows. I'm using the same template to call five differents windows because the screens and configurations are the same. The tag values are the only thing changed.

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/4/5/45ce625935c5025265b0c1fa02d2095cc6e07ef5.png)  
That's what I have. But I want to use only one window. Since all screens and configurations are the same. I want to change the values on this window when I click one of the five buttuns presented in the first picture. I don't want to call another window. I just want to call values.

Could you help me with this task?  
Regards,  
Leandro

---

<div class="post-metadata">

**Author:** ![Transistor](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/transistor/32/3380_2.png) [@Transistor](https://forum.inductiveautomation.com/u/Transistor)\
**Post date:** [December 29, 2022, 1:29pm UTC](https://forum.inductiveautomation.com/t/use-only-one-window-for-different-components-values/68062/2 "2022-12-29T13:29:43Z")

</div>

It sounds as though you need [Template Indirection - Ignition User Manual 8.1 - Ignition Documentation](https://docs.inductiveautomation.com/display/DOC81/Template+Indirection). There's a video tutorial on that page.

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [December 29, 2022, 1:41pm UTC](https://forum.inductiveautomation.com/t/use-only-one-window-for-different-components-values/68062/3 "2022-12-29T13:41:21Z")

</div>

Could also be as simple as creating a `tagpath` custom property in the root container of the popup window and passing the appropriate folder name in the `.openWindow` call. Window parameters as opposed to template parameters.

---

<div class="post-metadata">

**Author:** ![Leandro\_Garcia\_Carva](https://avatars.discourse-cdn.com/v4/letter/l/6f9a4e/32.png) [@Leandro\_Garcia\_Carva](https://forum.inductiveautomation.com/u/Leandro_Garcia_Carva)\
**Post date:** [December 29, 2022, 5:13pm UTC](https://forum.inductiveautomation.com/t/use-only-one-window-for-different-components-values/68062/4 "2022-12-29T17:13:09Z")

</div>

Sorry,

I'ts not so clear to me. Could you give me a sample. May be a scheen shot.  
Regars,

---

<div class="post-metadata">

**Author:** ![justinedwards.jle](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/justinedwards.jle/32/37854_2.png) [@justinedwards.jle](https://forum.inductiveautomation.com/u/justinedwards.jle)\
**Post date:** [December 30, 2022, 12:49am UTC](https://forum.inductiveautomation.com/t/use-only-one-window-for-different-components-values/68062/5 "2022-12-30T00:49:58Z")

</div>

I just want to make sure we understand all of the details:

In all 5 cases, the popup looks exactly like this:  
 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/4/8/48d8732b67fc57521e82d97830d8fea9a8033962.png)

Currently, you are using 5 separate popup windows, but you are wanting to eliminate 4 of them, and instead, simply change the tag that each of the fields in the popup are pointed at based upon which button is initially pressed?

Basically, if I understand what you are asking, you are wanting to know how to parameterize a popup, how to configure the various fields in the popup to display those parameters, and how to configure the 5 buttons to pass specific parameters into the popup when the popup opens. Correct?

---

<div class="post-metadata">

**Author:** ![Leandro\_Garcia\_Carva](https://avatars.discourse-cdn.com/v4/letter/l/6f9a4e/32.png) [@Leandro\_Garcia\_Carva](https://forum.inductiveautomation.com/u/Leandro_Garcia_Carva)\
**Post date:** [December 30, 2022, 11:12am UTC](https://forum.inductiveautomation.com/t/use-only-one-window-for-different-components-values/68062/6 "2022-12-30T11:12:14Z")

</div>

Yes, correct.

Could you kindly help me?  
Regards,

---

<div class="post-metadata">

**Author:** ![justinedwards.jle](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/justinedwards.jle/32/37854_2.png) [@justinedwards.jle](https://forum.inductiveautomation.com/u/justinedwards.jle)\
**Post date:** [December 30, 2022, 11:38am UTC](https://forum.inductiveautomation.com/t/use-only-one-window-for-different-components-values/68062/7 "2022-12-30T11:38:07Z")

</div>

I'm on the road today, so I'm not in a position to do a mock up with screenshots, but this is the information you are looking for:  
[Written tutorial](https://docs.inductiveautomation.com/display/DOC81/Parameterized+Popup+Windows)  
[Video Tutorial](https://www.inductiveuniversity.com/videos/parameterized-popup-window-and-udts/8.0/8.1)

---

<div class="post-metadata">

**Author:** ![justinedwards.jle](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/justinedwards.jle/32/37854_2.png) [@justinedwards.jle](https://forum.inductiveautomation.com/u/justinedwards.jle)\
**Post date:** [December 31, 2022, 12:22pm UTC](https://forum.inductiveautomation.com/t/use-only-one-window-for-different-components-values/68062/8 "2022-12-31T12:22:31Z")

</div>

I'm sure you've figured this out by now, but just in case, I've put together a tutorial that is specific to your usage case:

Here is a popup window with 5 numeric text fields:  
 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/8/b/8b95c9357a135af30e9b426b80c012d73357d3ea.png)

I have a list of tags that are going to be sent to the popup from various buttons, and will subsequently provide the values:  
 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/4/f/4f65f2edd30909f307753713c599e82b3b0baf3f.png)

These are my buttons that are in a main window:  
 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/a/b/ab125d9b62cba14c871125975002b8088ce732d8.png)

The 1st thing to do is right click on the root container of the popup window and select Customizers--\>Custom Properties:  
 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/5/d/5dd9dd8eadd9d8d3097f5467ea78acd02eab0068.png)

All of the custom properties should be strings:  
 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/2/1/2112fe833a4ef170a2d93fe76acaa39d9c587c4c.png)

Next, go back to the main window, and right click on the 1st button. Select 'Scripting':  
 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/b/2/b2a033a296e29e1b05e7a89570c7291412ddf428.png)

Using the actionPerformed event handler select Open/Swap, select the popup window to open [in my case, my window is simply named Popup], and finally, tick the box that says Pass Parameters:

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/0/e/0ec2825929b82ac55179cb86f96f1838c6261fd2.png)

Now, select the plus symbol in the parameters area to add the necessary parameters that should be passed to the popup:  
 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/1/6/16515c72cc52a7d26645fc181e660551f9701c51.png)

The dropdown will already be populated with the custom properties that were previously created on the popup:  
 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/0/0/003a7271ed9fe0e307a06d62f937bfa51a8adf39.png)

In the Tag Browser, right click on the tag that contains the value to be passed for each parameter, and select "Copy Path":  
 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/f/1/f1ebcf6fa59d6f4831aa30ee2394ca4ce35e1cde.png)

Paste the path into the Value column of the Pass Parameters editor:  
 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/4/1/419f23cc903bd9c73ef587803a7464ffa6397507.png)

**Repeat this process for all parameters and all buttons, and don't forget to hit the APPLY button each time**  
 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/0/d/0db22ca7e02efd767e76d5a4373d806d22ad42a2.png)

Once all of the buttons have been configured on the main page, go ahead and hit the play button on the designer, and test one of the buttons. If everything has been done correctly so far, the custom properties on the popup window should now be populated with tag paths:  
 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/2/2/22edfeee199c5c44974f4a48428fd8e2906f3d82.png)

The last step is to put indirect tag binding on each of the popup window components. To accomplish this, click on a component, and in the Vision Property Editor, click the binding icon next to the appropriate property:  
 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/8/f/8fa98dc5c491329bcf6717ebf3203b89e35c2211.png)

In the popup window, select Indirect Path, and then click the property icon next to the Indirect Tag Path text field:

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/2/3/236444a0eaad7ea6818472f958245efd23bcd03a.png)

Then, locate and select the appropriate custom property:

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/9/5/95a61fc60c9b706f5e08a576c3cfa4b199b4950a.png)

Repeat this process of each of the popup's components:  
 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/1/a/1a7d9fd38282faa63f36c2ead39eea25f35ff933.png)

The popup will now display different _live_ data depending upon which button launched it.

---

<div class="post-metadata">

**Author:** ![Leandro\_Garcia\_Carva](https://avatars.discourse-cdn.com/v4/letter/l/6f9a4e/32.png) [@Leandro\_Garcia\_Carva](https://forum.inductiveautomation.com/u/Leandro_Garcia_Carva)\
**Post date:** [December 31, 2022, 4:36pm UTC](https://forum.inductiveautomation.com/t/use-only-one-window-for-different-components-values/68062/9 "2022-12-31T16:36:15Z")

</div>

Hi Justin thank you very much for your help! It's working now in this away.

But we realized that we do need to transfer data directly to that template not to the window. Do you know how do I figure it out?  
Thank you,  
Leandro

---

<div class="post-metadata">

**Author:** ![justinedwards.jle](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/justinedwards.jle/32/37854_2.png) [@justinedwards.jle](https://forum.inductiveautomation.com/u/justinedwards.jle)\
**Post date:** [December 31, 2022, 5:10pm UTC](https://forum.inductiveautomation.com/t/use-only-one-window-for-different-components-values/68062/10 "2022-12-31T17:10:13Z")

</div>

> [@Leandro\_Garcia\_Carva](#):
>
> Do you know how do I figure it out?

Yes. The procedure is the same, but you will have to add 5 custom properties to the template, and within the template, you will indirectly bind your fields to those custom properties. They will all need to be strings:  
 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/7/0/70452957277e7567bac4beed9c2a96c536bc88db.png)

These parameters will be visible in the popup window.

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/f/5/f50b5d9c5e4df7f8284f0c75b8d4b73f1b7b82fa.png)

Bind each one of them to the root containers custom properties using a property binding:  
 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/4/8/487612ff16f95a2709dd52056ef59204cdff203f.png)

Afterwards, the data will pass into the template in the same way as before with the fields that were directly on the window.

---

<div class="post-metadata">

**Author:** ![Leandro\_Garcia\_Carva](https://avatars.discourse-cdn.com/v4/letter/l/6f9a4e/32.png) [@Leandro\_Garcia\_Carva](https://forum.inductiveautomation.com/u/Leandro_Garcia_Carva)\
**Post date:** [January 3, 2023, 12:53pm UTC](https://forum.inductiveautomation.com/t/use-only-one-window-for-different-components-values/68062/11 "2023-01-03T12:53:15Z")

</div>

Hi Got it,

Question: Nested templates are possible or if it has to be done using windows?  
We can nest UDTs but it seems like we can not nest the templates, only windows.

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [January 3, 2023, 1:31pm UTC](https://forum.inductiveautomation.com/t/use-only-one-window-for-different-components-values/68062/12 "2023-01-03T13:31:04Z")

</div>

Yes, you can nest templates within templates. While you are editing a template, drag another template into it.

---

<div class="post-metadata">

**Author:** ![Leandro\_Garcia\_Carva](https://avatars.discourse-cdn.com/v4/letter/l/6f9a4e/32.png) [@Leandro\_Garcia\_Carva](https://forum.inductiveautomation.com/u/Leandro_Garcia_Carva)\
**Post date:** [January 3, 2023, 5:09pm UTC](https://forum.inductiveautomation.com/t/use-only-one-window-for-different-components-values/68062/13 "2023-01-03T17:09:49Z")

</div>

But can it pop up a window though or does it need to stay within the same window?

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [January 3, 2023, 5:23pm UTC](https://forum.inductiveautomation.com/t/use-only-one-window-for-different-components-values/68062/14 "2023-01-03T17:23:53Z")

</div>

Yes, `system.nav.openWindow()` works the same at any level of template nesting.

---

<div class="post-metadata">

**Author:** ![Leandro\_Garcia\_Carva](https://avatars.discourse-cdn.com/v4/letter/l/6f9a4e/32.png) [@Leandro\_Garcia\_Carva](https://forum.inductiveautomation.com/u/Leandro_Garcia_Carva)\
**Post date:** [January 3, 2023, 7:14pm UTC](https://forum.inductiveautomation.com/t/use-only-one-window-for-different-components-values/68062/15 "2023-01-03T19:14:21Z")

</div>

Sorry but, could you give me a sample of it?

---

<div class="post-metadata">

**Author:** ![nminchin](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/nminchin/32/6911_2.png) [@nminchin](https://forum.inductiveautomation.com/u/nminchin)\
**Post date:** [January 4, 2023, 11:17am UTC](https://forum.inductiveautomation.com/t/use-only-one-window-for-different-components-values/68062/16 "2023-01-04T11:17:43Z")

</div>

> [@Leandro\_Garcia\_Carva](#):
>
> We can nest UDTs but it seems like we can not nest the templates, only windows

You _can't_ nest Windows, you can only nest _Templates_, unless you're not using the right terminology and you are talking about other things?

Template and Window are both Vision terminology. Template = object created in the Templates section of Vision that can be dragged onto and used in Windows.  
Windows = the pages that the client displays.  
UDT = a template of tags and tag folders that can be instantiated with different parameters to create tags for the same types of devices

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [January 4, 2023, 1:33pm UTC](https://forum.inductiveautomation.com/t/use-only-one-window-for-different-components-values/68062/17 "2023-01-04T13:33:58Z")

</div>

> [@nminchin](#):
>
> Template = object created in the Templates section of Vision that can be dragged onto and used in Windows.

And dragged onto and used in other templates.

---

<div class="post-metadata">

**Author:** ![Leandro\_Garcia\_Carva](https://avatars.discourse-cdn.com/v4/letter/l/6f9a4e/32.png) [@Leandro\_Garcia\_Carva](https://forum.inductiveautomation.com/u/Leandro_Garcia_Carva)\
**Post date:** [January 4, 2023, 4:17pm UTC](https://forum.inductiveautomation.com/t/use-only-one-window-for-different-components-values/68062/18 "2023-01-04T16:17:50Z")

</div>

Ok guys but can I target a template directly though with that? Don't I have to target a window that has a template in it?

---

<div class="post-metadata">

**Author:** ![Matrix\_Engineering](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/matrix_engineering/32/19781_2.png) [@Matrix\_Engineering](https://forum.inductiveautomation.com/u/Matrix_Engineering)\
**Post date:** [January 4, 2023, 4:25pm UTC](https://forum.inductiveautomation.com/t/use-only-one-window-for-different-components-values/68062/19 "2023-01-04T16:25:11Z")

</div>

> [@pturmel](#):
>
> Yes, you can nest templates within templates. **While you are editing a template, drag another template into it.**

See above...

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [January 4, 2023, 4:29pm UTC](https://forum.inductiveautomation.com/t/use-only-one-window-for-different-components-values/68062/20 "2023-01-04T16:29:12Z")

</div>

> [@Leandro\_Garcia\_Carva](#):
>
> but can I target a template directly

You mean, open it? No, you need a window. Which is why, for your simple needs, I didn't recommend a template in my earliest comment. Just a tagpath parameter on your popup window to be used with indirect binding.

{ This topic has gone a bit off the rails with unnecessary complexity for the question as originally posed. }

[Next page](https://forum.inductiveautomation.com/t/use-only-one-window-for-different-components-values/68062.md?page=2)
