I have written the following logic expression in PI AF analysis template:
If(Capacity="Full") Then(FindEq('Acid Level','*-36h','*', TagMax('Acid Level','*-36h','*')-0.04)) Else(" ")
When the user defined variable "Full" is not satisfied the output to PI Vision is still a timestamp (the current time). Trying to trouble shoot why the output is not a space (" ") I realized the value type for the tag output is 'DateTime'. If I understand what is happening correctly, if the if statement is not satisfied it returns the else command but since the else command is a string and the value type is 'DateTime' it will always return a timestamp (the default being the current time).
Therefore, I am wondering if there is a way to assigned the Value Type to both a 'DateTime' and 'String' depending on if the above if statement is satisfied or not. Or is there a different way I can define the if statement logic to output either a time or the string and bypass this value type?