Community Tip - Did you get called away in the middle of writing a post? Don't worry you can find your unfinished post later in the Drafts section of your profile page. X
I need to be able to reset a variable (specifically a UserSession variable/property) to NULL so that the behavior of my mashup is predictable.
I've tried:
newObject.username = NULL;
But this syntax throws a runtime error that "NULL" isn't defined.
Thanks for the help.
Solved! Go to Solution.
Stefan / Carlos, I actually figured this one out with a little trial and error. The keyword is actually "null" (all lower case). You can actually set a property to "null". I did it successfully; to the point that a Mashup Validate widget correctly evaluated an expression UserName=null as TRUE.
HOWEVER!!! The exception to this is SESSION properties. Once set; they will not reset to null without restarting browser (session). If you set them to "null"; they are simply set to "" (which is useful knowledge in it's own way). Hope this helps! It certainly did me.
I'm not sure, but I assume the "NULL" must be "undefined". Have seen this in some JAVA scripts.
I think it's not possible, I usually face this need too, but there's no way to "undefine" or set to null to an already set property.
Stefan / Carlos, I actually figured this one out with a little trial and error. The keyword is actually "null" (all lower case). You can actually set a property to "null". I did it successfully; to the point that a Mashup Validate widget correctly evaluated an expression UserName=null as TRUE.
HOWEVER!!! The exception to this is SESSION properties. Once set; they will not reset to null without restarting browser (session). If you set them to "null"; they are simply set to "" (which is useful knowledge in it's own way). Hope this helps! It certainly did me.