Hi folks,
I’ve got two parameters in my job, the first is a simple “Choice parameter” called “Choose", which has the following choices
dev
test
The second is an “Active Choices Reactive Reference Parameter” called “Hostname", which uses the following Groovy script to return a hostname. It references the above parameter.
if (Choose.equals("dev")) {
return "hostname1"
} else if (Choose.equals("test")) {
return "hostname2"
}
If I set the choice type to “Formatted HTML”, I can see the Hostname parameter update on the screen when I switch back and forth from dev to test. So the Groovy script is working. But when I try to reference the ${Hostname} parameter later on, it doesn’t appear to be set. Is there something I’m missing?
I’ve attached a couple of screen shots to show my configuration. Basically I’m trying to do an if / then on a parameter, setting another. If there’s a better way to do it, I’d love to hear it :)
Thanks very much!
-Adam vonNieda