|
Post by managetoconfig on Dec 17, 2018 17:15:44 GMT
Hello,
I've begun introducing an error catch for unsupported input choices in the AppTree element. Using TSVar and Condition attributes, I've been able to trigger an error condition when certain other variables exist and/or are set by evaluating their length, then allowing a "Back button" on an ErrorInfo action so the user can reselect. But my error catch was failing consistently until I set some monitoring variables that would be static through the iterative testing I was doing(Ctrl + F2 FTW!). I learned that my condition, Len("%Var%"), when evaluating an empty string "", was returning a 1 and not a zero as expected. Fortunately, for my purposes, a 1 works as well as a zero since I'm checking whether the variable exists and has a value, with little care for what the value is. I just found this to be odd, and potentially problematic, behavior. As for any deeper root-cause analysis I can only speculate since I achieved my desired functionality. I suspect that the empty quotes are being interpreted as some type of whitespace character(possibly by the XML parser?) and are not truly empty.
Thanks!
|
|
|
Post by Jason on Jan 1, 2019 1:49:06 GMT
I can't reproduce this. How are you setting Var to an empty string?
The following produces the expected result with Len returning 1:
... <Action Type="TSVar" Name="XYZ"></Action> <Action Type="Info" Name="myInfo" Title='Welcome' Condition='Len("%XYZ%") = 0'> ...
|
|