Use only one window for different components values

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

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

These are my buttons that are in a main window:
image

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

All of the custom properties should be strings:
image

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

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:
image

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

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

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

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

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

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

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:
image

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

1 Like