title: Dynamic or Conditional display of Jenkins job's parameters
body: <p>I am trying to use following jenkins job to generate Active Choices user selectable params for a job.</p>
  <p>my ask is to show/hide textbox when heartbeat_consumer checkbox is selected/unselected. I would also like to store the value of user input in <code>heartbeat_consumer_parms</code>, which can be accessed thru <code>env.heartbeat_consumer_parms</code>. I plan to use this value in downstream jobs.</p>
  <pre><code>pipeline {
      agent any
          stages {
              stage('Parameters'){
                  steps {
                      script {
                      properties([
                              parameters([
                              text(
                                  defaultValue: '''''', 
                                  name: 'application_servers',
                                  description: 'Please provide semicolon delimited (;) application server list ', 
                              ),
                              [$class: 'CascadeChoiceParameter', 
                                  choiceType: 'PT_CHECKBOX', 
                                  description: 'Select Services',
                                  name: 'application_services_list', 
                                  referencedParameters: 'application_servers', 
                                  script: 
                                      [$class: 'GroovyScript', 
                                      fallbackScript: [
                                              classpath: [], 
                                              sandbox: false, 
                                              script: &quot;return['']&quot;
                                              ], 
                                      script: [
                                              classpath: [], 
                                              sandbox: false, 
                                              script: '''
                                              if (application_servers.length() &gt; 0){
                                                  return[&quot;heartbeat_consumer&quot;, &quot;surgeon_cloud_login&quot;, &quot;system_configuration&quot;]
                                              }
                                              '''
                                          ] 
                                  ]
                              ]
                              ])
                          ])
                      if (application_services_list.contains('heartbeat_consumer')){
                              text(
                              defaultValue: '''''', 
                              name: 'heartbeat_consumer_parms',
                              description: 'Please provide heartbeatconsumer job parms ', 
                              )
                      }
                      }
                  }
              }
          }
      }
  </code></pre>
  <p>with current implmentation I am not seeing that textbox <code>heartbeat_consumer_parms</code> is being displayed at all.</p>