title: Appmaker -How to populate options in dropdown from datasource based on the option selected from previous dropdown in Appmaker?
body: <p>I have 2 dropdowns Operating System and OS version namely. Each OS can have multiple OS versions and each OS version can be linked to more than one OS.</p>
  
  <p>Once an OS is selected the OS version dropdown must get enabled and the options(OS versions) should be fetched from the datasource based on the OS selected above.</p>
  
  <p>I tried using query script but how do I pass the client side value(selected option in OS i.e app.pages.RegisterServers.descendants.Dropdown8.value) to the query script?</p>
  
  <p><a href="https://i.stack.imgur.com/m2BsW.png" rel="nofollow noreferrer">Image of form for reference</a></p>
  
  <p>In the onClick event of OS dropdown I added the below code</p>
  
  <pre><code>   app.pages.RegisterServers.descendants.Dropdown9.enabled=true;
    app.datasources.OSVersion.query.parameters.os_name=
    app.pages.RegisterServers.descendants.Dropdown8.value;
  </code></pre>
  
  <p>And in the query script of OSVersion datasource I added a parameter os_name.</p>
  
  <p>Query script code</p>
  
  <pre><code>  var osVersionResult = [];
   // Modify passed query to additionally filter by OS.
    query.filters.OpsName._equals=query.parameters.os_name;
    osVersionResult = query.run();
    return osVersionResult;
  </code></pre>
  
  <p>But this is not working. Please suggest if you see any reason for this.</p>