This website uses cookies. By clicking Accept, you consent to the use of cookies. Click Here to learn more about how we use cookies.
Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
- Revenera Community
- :
- InstallAnywhere
- :
- InstallAnywhere Forum
- :
- Evaluate empty string
Subscribe
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jan 07, 2008
08:36 AM
Evaluate empty string
Is there an easy way to evaluate if a user input string is empty? I have a dialog prompt in which the user is asked to input a value. They can leave the value blank. I could implement a Custom Rule to handle this - but I have to think there is an easier way.
(2) Replies
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jan 07, 2008
08:45 AM
hi,
you can add a rule----
choose installanywhere variable.
You know the name of your variable say
use like this
$USER_INPUT_RESULT_2$ does not equal $NULL$
or you can even use like this
$USER_INPUT_RESULT_2$ does not equal $EMPTY_STRING$
In installer $EMPTY_STRING$ and $NULL$ are equal
you can add a rule----
choose installanywhere variable.
You know the name of your variable say
use like this
$USER_INPUT_RESULT_2$ does not equal $NULL$
or you can even use like this
$USER_INPUT_RESULT_2$ does not equal $EMPTY_STRING$
In installer $EMPTY_STRING$ and $NULL$ are equal
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jan 07, 2008
10:23 AM
I wasn't able to use $EMPTY_STRING$ or $NULL$ in the rule. Instead, I had to say:
$MY_VARIABLE$ equals ""
I wrote out the variables to a file and noticed that they add double quotes around strings. I'm not sure if I like this or not (since we will likely have to strip the quotes when we use the data later). Anyway, one more problem resolved.
$MY_VARIABLE$ equals ""
I wrote out the variables to a file and noticed that they add double quotes around strings. I'm not sure if I like this or not (since we will likely have to strip the quotes when we use the data later). Anyway, one more problem resolved.