Community Tip - You can change your system assigned username to something more personal in your community settings. X
I'm trying to use a Derived tag to compare a string tag to some static strings and return boolean response for if it matches or not. I was hoping the logic operator == would do this like it does for numerical values but expression validation returns "String tag expected". Is there another logic operator to use to compare string values or do I have to do something different?
Using KepServerEX 6.14
Thanks!
Solved! Go to Solution.
It actually does work for String comparison. Please see the example below:
Then writing the same value to String2 evaluates correctly:
Best regards,
Andy Servetas
Principal Technical Support Engineer | Kepware Technologies
Article - "Derived tags not allowing Arithmetic Function with String Tag in a single Expression in PTC Kepware Products": https://www.ptc.com/en/support/article/CS388921
It actually does work for String comparison. Please see the example below:
Then writing the same value to String2 evaluates correctly:
Best regards,
Andy Servetas
Principal Technical Support Engineer | Kepware Technologies
Thanks to both of you for the responses!
With this information, I was able to confirm that my string comparisons only work when they are the only thing in the derived tag. Since I had 4 strings to compare, it took me 5 tags instead of one to achieve my goal but it will work for now. Would be nice to see PTC take this up as an enhancement, where I can do a string evaluation with == in a derived tag and then perform arithmetic functions on the result.