DataQuality

Hi,

I just have a question about the data quality values of the tag properties do they return a string or a number. I have the expression below on a sqltag name CommError but I am not getting the results I am expecting. The quality for the the FaultBatt tag is unknown but the CommError Tag is 0

if(({[.]FaultBatt.Quality}=“Bad”)||
({[.]FaultBatt.Quality}=“Comm_Error”)||
({[.]FaultBatt.Quality}=“Unknown”), 1, 0)

Thanks

I found out what I was doing wrong quality return a value an not a string.

Thanks

Well I thought I fix it but nothing I dont get tag to evaluate correctly.

if(({[.]FaultBatt.Quality}!=192),1,0)

Thanks

For future reference, we got this to work by casting the tag quality reference to an integer using the toInt() expression function.