I created Binding expressions that enables tag readings and tag history depending of some conditions related to the UDTs parameters. The problem is when the condition is not met, the tags and histories are enabled anyway.
For example, I have 5 channels of 2 modules to read, I have a UDT parameter that says "numberOfModules" and another that says "numberOfChannels" and the tags related to the channel 5 and module 2 should be enabled only if there is at least 2 modules and 5 channels so the condition is:
{numberOfChannels} >= 5 && {numberOfModules} >= 2
For example, even if numberOfModules = 1 and numberOfModules = 4, the tags related to channel 5, module 2 are always enabled.
If your example is a direct copy/paste, you're missing your braces on numberofModules. Do you mind doing a direct copy/paste of your expression you're using? Or even screenshots of how you have it configured?
It was not a direct copy/paste, here pictures of the actual parameters and the bindings, also, I tested it on a regular tag expression and everything was OK the flag was doing what I expected it to do
You might try putting in some default values for those parameters. What I've discovered is that if left blank (null) you'll get weird results and simply putting in defaults of even a blank string for strings or zero for integers fixes things.
But while trying I deleted everything and created it back again and I noticed that every tags started as "bad disabled" (as we wished) but then they all have been enabled one by one as if the condition was met even though it was not met.
I find this very weird, especially when I tested everything on an expression Tag and it was working fine
Bindings on tag properties in UDTs have always behaved differently from expression tags and other expression bindings. They do not subscribe to references, but are only evaluated when a UDT is created or restarted (parameter writes do restart the UDT instance).
What you've shown should work when instantiating or altering parameters, I would think, so you might want to get support involved. (This forum is not official support.)