Indirect tag binding with an expression

I am wanting to use indirect / dynamic tag paths using an expression binding on an object but I keep getting an error message stating “Nested paths not allowed”. I have tried the following:

{[default]BBC_Clgx/FermAuto/FermDrainVlvs/FermDropVlvAO+{RootContainer.FermValveNum}+“Select”} = 1
and
tag({[default]BBC_Clgx/FermAuto/FermDrainVlvs/FermDropVlvAO+{Root Container.FermValveNum}+“Select”} = 1
)

but get the same error message. Is there a way to assign a dynamic tag name in an expression binding?

Yes, that would be the tag() expression function. But better to make a separate property indirectly bound, and use that in your comparison expression.

This was helpful for me! Here is what my expression looked like, and it works as an Event Driven execution.

tag(concat({[.]Region},'/Setup/ContractDay'))

Note what @pturmel said.

It's a good idea to add a custom property and populate it with an indirect tag binding bind. You can reference that value in an expression using a property binding if needed and write to it by making it bidirectional. I believe indirect bindings are faster than expression bindings.

Correct me if I'm wrong but I'm pretty sure that's correct. It is what I do.

1 Like