Forum Discussion
string default set by tcl expression
Mark-
I'm afraid that is not possible. I described why in a prior post (https://devcentral.f5.com/community/group/aft/2166295/asg/2032). The problem is that when Tcl is included in an APL statement, for example to construct the contents of a dropdown, the code is run prior to the web page rendering. In other words, by the time you see the page and are able to made a dropdown choice above, the code below has already been run.
It is possible to change the apparent default value of a field according to choices made above it in a template, but the method is a bit messy. You must create 2 APL fields and surround them with optionals, ie.:
choice use_https default "no" { "yes","no" }
optional ( use_https == "yes" ) {
string port_1 default 443
}
optional (use_https == "no" ) {
string port_2 default 80
}
-Fred
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)Recent Discussions
Related Content
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com