Forum Discussion

Tihomir_Hristov's avatar
Tihomir_Hristov
Icon for Nimbostratus rankNimbostratus
Mar 27, 2015

Using one choice input to control second choice input's default value?

Hey guys,

 

I am absolutely a newbie when it comes to writing iApps template and am working on setting up a template for our new F5 deployment to match the Route Domain-drive design we have implemented. I was able to pretty much achieve all of our goals, except for a small requirement:

 

We have 2 choice variables following each other. We would like to affect the default value of the 2nd variable based on input from the first. I have in mind something similar to this:

 

choice first_selection display "xxlarge" default "choice1"

 

optional ( conf_mode == "choice1" ) {

 

choice second_selection display "xxlarge" default "option1" } optional ( conf_mode == "choice2" ) {

 

choice second_selection display "xxlarge" default "option2" }

 

The only problem is that I get a message that I am defining the second_selection variable twice. Could you gurus please let me know how this can be achieved. The main goal here is to only use these two choice variables and not add another one.

 

Thank you

 

2 Replies

  • Fred_Slater_856's avatar
    Fred_Slater_856
    Historic F5 Account

    Unfortunately, defaults are static in APL. They are set when the page renders and cannot be dynamically modified.

     

  • That's what I thought. I just wanted to make sure I am not missing some slick feature/functionality of APL.

     

    Thanks guys