James Gill Posted March 2, 2010 Posted March 2, 2010 (edited) I am trying to validate a variable in a script I created. I want the script to skip over the variable to an else statement if the variable is not valid but neither the if(NotValid) or if(IsEmpty) script steps are getting me the result I want. Is there something else I need to know about validating with variables? Edited March 2, 2010 by Guest
bcooney Posted March 2, 2010 Posted March 2, 2010 Let's say you set $var = 1. Then: If [ not isempty ( $var) ] do this stuff else do other stuff endif should work. In fact, you could probably just say if ($var).
James Gill Posted March 3, 2010 Author Posted March 3, 2010 (edited) Unfortunately I can't simply match the variable name because it is dependent upon the logged in users username. For some reason the if [not isempty ($var) ] still doesn't work correctly, but I came up with Case (not(IsEmpty($$path));True;False) = "0" that returns a 1 and 0 when the variable is present and not present and this seems to get the job done. Edited March 3, 2010 by Guest
comment Posted March 3, 2010 Posted March 3, 2010 Case (not(IsEmpty($$path));True;False) = "0" is a very elaborate way to write: IsEmpty ( $$path )
Recommended Posts
This topic is 5380 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now