Popup Templates (Perspective)

I have been going through and creating Popup templates for components. The goal is when a user clicks on a valve, it will popup a template view that will auto populate the tags in the template.

I am going to state the way I did it to see if it is the correct way and to show the problems I have found along the way.

The first thing I did was just create a view with all the information and buttons needed going directly to the tags in the system. This is just for placeholder:

1

I then went to the “Perspective Property Editor” of the template view. Within that, there is a “PARAMS” section where I would put in the parameter names that will act as the indirect tags for the view. The “Key” would be an appropriate name with the value being a directed tag for placeholder:

Next, I would change all the bindings of the components in the template to indirect bindings with it pointed to the appropriate “PARAMS” value I just created:

I would go to the screen where the popup is going to happen. I would “Configure Events” on the appropriate valve. I would configure an onclick event with popup. I would then use the Parameters feature to pass in values to the “PARAMS” I created on the template. There is a “+” button to add the parameter. This is where a first problem would occur. One, it brings up this whole list of all the parameters and there seems to be no order to it. It will also bring parameters from other templates created so you get this huge mess of parameters with no order to them:

Also, there would be this weird occurrences where if I click on the plus button, it will automatically put in the last parameters in that screen. I would have to hold in the click and go and select the right one.

But this all leads to my big question is with this, I can create a copy of the component and change the values in the Parameters in the popup from “Valve_1” to “Valve_2”. The only way I found of doing this it to manually go through each value and retype the text from “1” to “2”. Is there any kind of search and replace feature in this to be able to quickly change these values? The other question is if I am doing the “right way” of doing this?

Thanks

Seems to me like you could use only one parameter on your popup that would house the path to your UDT: [default]SBS_101_PLC/VALVE_1. From there, in your indirect tag bindings you would reference the tagPath parameter and add the specific tag at the end, something like {tagPath}/DS_OPEN. Unless I’m misunderstanding your setup, this would allow you to only have one parameter to pass when opening a popup, and would be much better practice than what you currently have.