Client Expression Tag Subscription

I am trying to figure out how to create a new expression that will monitor a tag based on path input without the provider. ex tagCommand("test/udt") and have it work similar if I used the expression tag("[default]" + {udtPath} + "/tag") so the process is quicker for setting up.

I was able to get the expression to read the tag once, but if the tag value updated, the vision component would not update unless the page was reloaded. I was not using a listener before, but I am trying to figure out how to go down this route. I am not understanding how to use the listener functions or if subscribing is the best route to go down.

Don't do it this way. Add a string custom property to your component that you can pass the tag path to, and use an indirect tag binding. It will look like this:


{1} is where the string argument will be passed.

This is the module development category, so the implications are different.

But I would say that any tag subscription functionality that only works with the [default] tag provider prefix is utterly broken.

Do do this. And, avoid doing tag subscriptions in expression functions--there are non-trivial negative side effects.