No Result Found Code

I followed the no result found code on here and added to my site. Can you tell me if I did it correctly because it’s not working. I want the user to filter by Category, City & State. if no results it should populate a message. Thanks for your help.
Below is my code:

import wixData from ‘wix-data’;

$w.onReady( function () {
//TODO: write your page related code here…

});
export function searchbutton_click(event, $w) {
$w(“#dataset2”).setFilter(wixData.filter()

    .contains("category", $w('#vendordropdown').value) 
    .and(wixData.filter() 
    .contains("cityState",$w('#cityandstatedropdown').value) 
) 
).then((results) => { 
      console.log("Dataset2 is now filtered"); 
      $w('#Vendorlist').data = results.items; 
    }). **catch** ((err) => { 
        console.log(err); 
    }); 

$w(‘#Vendorlist’).expand();
}

function search() {
wixData.query(‘category’)
.eq(‘category’,
$w(“vendordropdown”).value)
.find()
.then(res1 => {
if (res1.items.length===0){
wixData.query(‘category’)
.eq(“category’,000”)
.find()
.then(res2 => {
$w(‘#Vendorlist’).data=res2.items;
})
. catch ((error)=> {
let errormsg = error;
});
}
$w(‘#Vendorlist’).data=res1.items;
})
. catch ((error)=> {
let errorMsg = error;
});
}

what is the output on the console ?

I am sorry I have no clue what you mean by the output on the console. I am new to wix coding and trying to self - teach. I have tried inserting this no result code within my original code but still haven’t had any luck.

).then((results) => {
let count = $w(“#dataset2”).getTotalCount();
if (count === 0){
$w(“noResText”).show();
}
if (count >= 1) {
$w(“noResText”).hide();

}

It is very important to learn how to use the console, use this guide: Velo: Testing and Troubleshooting Your Code | Help Center | Wix.com

Ok I understand now, after reading the link. Thank you!. The output on the console states this:
TypeError: $w(…).show is not a function … to the right of the console: Vendor list All … Line 17

Line 17 is on my code as:
$w(“noResText”).show();

This happens when I select a category that I know is not located in that particular state.
NoRestext I used as my textbox ID

I figured it out. My code works now. Thank you