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
- :
- How to select only the variable that has the value1
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
Jul 04, 2013
09:39 PM
How to select only the variable that has the value1
Hello everyone,
I'm new to this forum and this is my first post.
I'm somewhat struggling finding out a way to find out the the variables with the value 1. Here is the scenario, I've have an action n the pre-install section where I prompt the user the to select the business types out of 5 given types where the user can select multiple types. Say if I want to select the business types that are numbered 2&4, I'll type in 2,4 after the prompt, which will assign the variable's 2 & 4 with the value 1 and rest of the variables will have zero as the value.
Here is the output text to console in the pre-install section that I have.
BUSINESSTYPE=$BUSINESSTYPE$
BUSINESSTYPE_1=$BUSINESSTYPE_BOOLEAN_1$
BUSINESSTYPE_2=$BUSINESSTYPE_BOOLEAN_2$
BUSINESSTYPE_3=$BUSINESSTYPE_BOOLEAN_3$
BUSINESSTYPE_4=$BUSINESSTYPE_BOOLEAN_4$
BUSINESSTYPE_5=$BUSINESSTYPE_BOOLEAN_5$
With this , the value I get on the screen is as below.
ENTER A COMMA-SEPARATED LIST OF NUMBERS REPRESENTING THE DESIRED CHOICES, OR
PRESS TO ACCEPT THE DEFAULT: 2,4
BUSINESSTYPE="","BBBBBBBB","","DDDDDDDD",""
BUSINESSTYPE_1=0
BUSINESSTYPE_2=1
BUSINESSTYPE_3=0
BUSINESSTYPE_4=1
BUSINESSTYPE_5=0
What I'm trying to achieve here is, pick only the variables that has 1 as the value and pass it to another variable that can be used in the post install section to update a property file. I can also use the variables with the value 1 in the post install section without passing it to another variable whichever is feasible.
Thanks in advance.
I'm new to this forum and this is my first post.
I'm somewhat struggling finding out a way to find out the the variables with the value 1. Here is the scenario, I've have an action n the pre-install section where I prompt the user the to select the business types out of 5 given types where the user can select multiple types. Say if I want to select the business types that are numbered 2&4, I'll type in 2,4 after the prompt, which will assign the variable's 2 & 4 with the value 1 and rest of the variables will have zero as the value.
Here is the output text to console in the pre-install section that I have.
BUSINESSTYPE=$BUSINESSTYPE$
BUSINESSTYPE_1=$BUSINESSTYPE_BOOLEAN_1$
BUSINESSTYPE_2=$BUSINESSTYPE_BOOLEAN_2$
BUSINESSTYPE_3=$BUSINESSTYPE_BOOLEAN_3$
BUSINESSTYPE_4=$BUSINESSTYPE_BOOLEAN_4$
BUSINESSTYPE_5=$BUSINESSTYPE_BOOLEAN_5$
With this , the value I get on the screen is as below.
ENTER A COMMA-SEPARATED LIST OF NUMBERS REPRESENTING THE DESIRED CHOICES, OR
PRESS
BUSINESSTYPE="","BBBBBBBB","","DDDDDDDD",""
BUSINESSTYPE_1=0
BUSINESSTYPE_2=1
BUSINESSTYPE_3=0
BUSINESSTYPE_4=1
BUSINESSTYPE_5=0
What I'm trying to achieve here is, pick only the variables that has 1 as the value and pass it to another variable that can be used in the post install section to update a property file. I can also use the variables with the value 1 in the post install section without passing it to another variable whichever is feasible.
Thanks in advance.
(1) Reply
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
Aug 02, 2013
04:41 AM
You can try writing a Custom Code to do this.
There is also a Compare InstallAnywhere variable numerically rule where you can perform an action depending on the IA variable value, but not sure if it suits your scenario.
There is also a Compare InstallAnywhere variable numerically rule where you can perform an action depending on the IA variable value, but not sure if it suits your scenario.
