Generic in Expression Tag

In an Expression Tag, we could put something like this:


To get the Boolean value of the Alarm which is AlertActive in the tag with path {[~]A/B0/C/D.AlertActive}

Note that there is “B0” among the tag path. Now, I have identical tag paths, like that, except the number is different:


My question is, is there any way to make this generic is captured in the Expression Tag? Something like this:

{[~]A/B{1}/C/D.AlertActive}  then we refer {1} to anything we like.

As of now, I am trying to create Expression in the UDT tag itself. If it cannot be made generic, then I have to create unique expression for each Expression Tag instance instead of from UDT. :frowning:

If it is in a UDT then you just use Indirects for setting this up.
Here is an example one that we use in a UDT


And then the tags under the UDT reference the variables from the UDT


Tag paths can be made generic in expressions by using the “tag” expression function. Check out the documentation on “tag” to find out more:


Hi nmudge,

Thanks for the reply. I actually have checked the short tag() documentation which you sent before I asked but still could not find work around with my case. :frowning:

The link shows that we can make use of Custom property like {Root Container.tankNum}.

In my case, the UDT is shown in a set of Components of a Template in a Template Repeater. The Template Repeater has a Repeat Behavior of Count and has Index Parameter Name “index”.

Now, the UDT I have contains some other base Tags and each base Tag is mapped to one Component in the Template, which is in the Template Repeater.

So, my question here is more like, from the base Tag in my UDT, how can I know the index in the Template Repeater it is actually referred to?

Hi MMaynardUSG,

Thanks. Your reply is pretty close in solving my issue actually. Except that I have multiple levels of tags which makes it rather hard except I copy over all the parameters to the children tags. :frowning:

I have tags with paths like:


Thus, I only need to put Number in my B tags as Data Type Parameter. However, I do not know how to access B Data Type Parameter from D. I could easily get D’s (assuming D is Expression Tag) Data Type Parameters in its Expression like this {Number}, but how to get C’s or B’s?

Since each C is another UDT owned by each B, I don’t know if we could get relative parent Parameters. I know that we could get our own custom parameters which are very useful indeed. But how to get the parent’s (or the parent’s parent’s). Is there a way to automatically pass down this custom parameter to all its children and its children’s children? Like inheritance protected concept in OOP like C# or Java I mean.

Any workaround? :frowning:

When you load a template into a template canvas or template repeater, the Parameters can be set as you load them. They are in a field called parameters, in a dataset called Templates which is a property of the canvas or repeater.

For example, here is a screenshot of a template canvas we use
The Parameter field passes all of the parameters for the template to the template.


Thanks for the input @MMaynardUSG, will try that out.