Example - Indirect Template
Let's take a look at how we can set something like this up. First, we need to make sure we have a fresh template and some similarly named tags, like I have done below.
We can then right click on the background of the template, and select Customizers->Custom Properties, where we will add our Template Parameter. We only need to add one, and name it something that makes sense. In this instance, the template will be of some values from a motor and the parameter that will be passed to it will be the number of the motor, so I called mine MotorNumber and made it of type integer.
Next, we want to add some components to our template, being sure to utilize the Template Parameter MotorNumber that we created earlier to make them indirect. A Label component at the top with a simple expression binding will clearly display what motor is being shown in the template.
Then we can add two Numeric Text Fields, one for the Amps tag in the Motor UDT and one for the Status tag. I have also added a pair of labels to make it clear what each Numeric Text Field is displaying. We can then add an Indirect Tag Binding to the Value (Integer) property of the Numeric Text Field that will display our Amps tag. We want to bind it to an Amps tag and then in the tag path, just take out the number of the motor as a reference and attach the MotorNumber Template Parameter that we created earlier. We will want to repeat this on the second Numeric Text Field, except we will indirectly bind it to the HOA Status tag
And that is it! The only thing left to do is drag a few instances of the Template onto a window. We can then enter a different value into our MotorNumber for each template and all of the templates will now display different tag values from one another. In addition, it is very easy to bind the MotorNumber property to something, allowing you to easily change what motor the template is displaying in the client during runtime!