How do you test if a variable is Undefined, Unset, Empty, False, etc...? Do you compare to null, "", "-Select-", length() == 0? All of the above? (I sure hope not!!!) Which comparison do you use for a string field type of Single Line/Multi Line/Single Select/Multi Select? I gotta say, checking against "-Select-" is the single stupidest implementation in the Deluge scripting language. Worse, it's not always a string. When returning an empty/unselected dropdown value back from a function, you get an error.
alert(input.Dropdown_1); -> "-Select-"
but
string x(string y) { return input.y; } -> Error in Alert task
Is it just me or is there a complete lack of consistency? What is going on here? Is there someone that can clear this all up or am I alone in struggling to understand in what circumstances I need to compare against which comparisons?