cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Highlighted
nihar1983
Pilgrim

How to assigned a variable using the drop down menu.

Hi,
I am creating one drop down menu using InstallAnywhere default wizard.

In drop down menu I kept options like 5%, 10%, 15% etc.
and giving the variable for the corresponding value to $FIVE$
if I choose 5 Then $FIVE$ is set to 1.

I want if $FIVE$ is set to 1 then one external variable like $HIGH$ will be set to 5. How can I achieve this in same wizard. and also to validate as per the input.

Thanks
Nihar
Labels (1)
0 Kudos
3 Replies
Highlighted
jerome_IA
Flexera beginner

Re: How to assigned a variable using the drop down menu.

I am not sure what you are calling "drop down menu using InstallAnywhere default wizard", but I guess you are talking about Get user input actions ?

You can use simple get user input like this:
You have you drop/down list containing 5,10,15,etc...
There will be one result variable that you call $FIVE$

When end user will press next after selecting e.g. "5" from drop/down list, then the variable $FIVE$ will take value of: "5","","",etc...
I guess this is useless, but you can also access the following variables:
$FIVE_1$ will equal 5
$FIVE_2$ will equal
$FIVE_3$ will equal
$FIVE_etc$ ....
Also check "VAR_BOOLEAN_X Variable" in documentation if you prefer dealing with boolean.
Then you can add a set variable action for setting your $HIGH$ variable according to the result above.

Please clarify what you really want (maybe adding one screen shot), because there are many other options to do this. Also note that if you need a console mode, variable in get user input are a bit different.

--Jerome
0 Kudos
Highlighted
nihar1983
Pilgrim

How to assigned a variable using the drop down menu.

Thanks Jerome for your quick reply.

I attached all the screen shot what I want and also explain what I want on attached doc below screen shot.

Thanks
Nihar
0 Kudos
Highlighted
jerome_IA
Flexera beginner

Re: How to assigned a variable using the drop down menu.

Hi,

Ok, thanks for adding details ...

What you should do is:
1- Create a jump label action
2- Add your Advance get user input "High/Low watermark" (figure 1 in your .doc)
3- Call custom code or execute command that will calculate the following expression:
5 * $FIVE_WATERMARK$ + 10 * $TEN_WATERMARK$ + N * $N_WATERMARK$ ... etc ....
And store result in $HIGHWATERMARK$
(You can also use ExpressionEvaluator from plugins http://www.flexerasoftware.com/products/installanywhere/files-utilities.htm .... I never used it)

(Do the same also for low)

4- Add a show msg/dialog action with rule "compare variable num" that match what is forbidden (e.g. $LOWWATERMARK$ greater than $HIGHWATERMARK$)

5- Add a jump to Next that go to the previously created jump label and that apply the same rule than in "4-" (So that end user will be forced to re-enter drop/down choice)

You're done.
0 Kudos