Indirect tags, arrays, templates

Hi,
I have 2 questions regarding tags and templates. I'm grabbing tags from an OPCUA server.
1- When indirectly binding tags, it seems like I can't index a specific array element. I get a syntax error regarding the "[" character. ex: [tags]dog{1}/bBark[0]. I would also need to subtract 1 from the index. How would I do that?
2- Is it possible to modify some template parameters in an instance? I'd like something similar to modifying a component in a group.
Thank you.

  1. Works fine for me. Using this:
    image
    Where {1} contains the path of an integer array path, and {2} contains a integer
    You can't do math there though. If it needs to be dynamic, create another custom property, and do the math there. Then reference that prop in your indirect tag binding.

  2. what ?

1 Like

I mean if I have 10 instances of a template and only want one component in one of them to not follow that template indirect tag binding. How do I do that?

You cannot. The point of templates is to be entirely standardized, there's no way to override individual values in a single instance (other than "baking in" that logic to the template itself, via more parameters).

Got it. Is there a way to check what the logic evaluates to in the instance?

Not really; you can use labels as debug tools at runtime for some things, but there's no built in tool that will tell you what everything's values are.

I realized that in the template designer itself I can put sample numbers for the template property variable and see what that evaluates to! I originally had it empty because I thought it would use that specific number for all instances and override the instance variable but that's not the case :slight_smile: Thanks.

1 Like

Just be aware that values you enter into the designer will be the initial value that's used when you first create a new instance of the template. Generally you'll have a binding or property assignment or something else that more or less instantly runs and replaces it with a "real" value, but it could be confusing if an "incorrect" value is momentarily displayed.

1 Like