title: Wix Corvid Database Filtering Conditional
body: <p>I have setup a filter using the code queen video-works great except one part-</p>
  
  <p>I got two dropdowns,</p>
  
  <p>Category and subcategory,I am trying to setup simple conditional filtering</p>
  
  <p>When I click category, on change event happens -> subcategory gets activated(this is working)</p>
  
  <p>Subcategory should conditionally filter and show only relevant/matching results,however shows all the results from the field.</p>
  
  <p>For eg.  Category dropdown we choose - industrial houses -> Subcategory becomes active and shows only the results that match for the industrial category</p>
  
  <p>Currently shows every element from the field,can anyone help me?</p>
  
  <p>Here is the code.Thank you</p>
  
  <pre><code>
  $w.onReady(function () {  //code that clears the search
    $w('#clear').onClick(() =&gt; {
        $w('#dropdown1 , #dropdown2 , #dropdown3, #dropdown4, #dropdown5 , #dropdown6').value = "";
        $w('#dataset1').setFilter(wixData.filter())
          .then();
      });
  });
  
  export function button1_click(event, $w) { //filter on click even
  
  let searchValue = $w("#locationSearch").value;
  
    $w("#dataset1").setFilter(wixData.filter()
  
   .contains("bathrooms",$w('#dropdown1').value)
   .contains("bedrooms", $w('#dropdown2').value)
   .contains("typesOfProperties", $w('#dropdown5').value) //CATEGORY DROPDOWN
   .eq("subcategory", $w("#dropdown6").value) //SUBCATEGORY DROPDOWN
    .contains('propertyAddress', searchValue)
    .contains('averagePrice', $w('#dropdown7').value))
  
        .then((results) =&gt; {
        console.log("Dataset is now Filtered");
        $w("#repeater1").data = results.items;
       })
     .catch((err) =&gt; {
        console.log(err);
    });      
  
   $w("#repeater1").expand();}
  
  //FILTER FROM THE CODE QUEEN VIDEO THAT SHOULD SHOW ONLY MATCHING RESULTS
  
  export function dropdown5_change(event, $w) {
  SubCatFilter(); }
  function SubCatFilter (){
  $w("#dropdown6").enable();  //SUBCATEGORY DROPDOWN
  $w("#dataset1").setFilter(wixData.filter()  //BOTH FIELDS IN THE SAME DATASET
  
  .eq("subcategory", $w("#dropdown5").value)  //SUBCATEGORY KEY FIELD 
  )
  }
  </code></pre>