Use only one window for different components values

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.
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.

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?

It sounds as though you need Template Indirection - Ignition User Manual 8.1 - Ignition Documentation. There's a video tutorial on that page.

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.


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

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

In all 5 cases, the popup looks exactly like this:

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?

Yes, correct.

Could you kindly help me?

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
Video Tutorial

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:

I have a list of tags that are going to be sent to the popup from various buttons, and will subsequently provide the values:

These are my buttons that are in a main window:

The 1st thing to do is right click on the root container of the popup window and select Customizers-->Custom Properties:

All of the custom properties should be strings:

Next, go back to the main window, and right click on the 1st button. Select 'Scripting':

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:

Now, select the plus symbol in the parameters area to add the necessary parameters that should be passed to the popup:

The dropdown will already be populated with the custom properties that were previously created on the popup:

In the Tag Browser, right click on the tag that contains the value to be passed for each parameter, and select "Copy Path":

Paste the path into the Value column of the Pass Parameters editor:

Repeat this process for all parameters and all buttons, and don't forget to hit the APPLY button each time

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:

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:

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

Then, locate and select the appropriate custom property:

Repeat this process of each of the popup's components:

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

1 Like

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,

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:

These parameters will be visible in the popup window.

Bind each one of them to the root containers custom properties using a property binding:

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

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.

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

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

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

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

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

And dragged onto and used in other templates.

1 Like

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?

See above...

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. }