# Velo Search - Dynamic Dataset

**URL:** <https://forum.wixstudio.com/t/velo-search-dynamic-dataset/62642>\
**Category:** Ask the community\
**Tags:** question, code\
**Created:** [September 10, 2024, 10:48am UTC](https://forum.wixstudio.com/t/velo-search-dynamic-dataset/62642 "2024-09-10T10:48:09Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Harriet\_Morton-Liddl](https://sea1.discourse-cdn.com/wix/user_avatar/forum.wixstudio.com/harriet_morton-liddl/32/80824_2.png) [@Harriet\_Morton-Liddl](https://forum.wixstudio.com/u/Harriet_Morton-Liddl)\
**Post date:** [September 10, 2024, 10:48am UTC](https://forum.wixstudio.com/t/velo-search-dynamic-dataset/62642/1 "2024-09-10T10:48:09Z")

</div>

**Question:**  
Does my code look correct - it doesn’t seem to be working? Dyanmic Dataset search bar  
**Product:**  
Velo

**What are you trying to achieve:**  
I am trying to get my search bar to search using company name however it doesn’t return the company name

**What have you already tried:**  
import wixData from ‘wix-data’;

$w.onReady(function () {

```
//SEARCH BUTTON TRIGGER⚡
$w("#searchButton").onClick(function () {
    search();
});

//ENTER KEY TRIGGER⚡
$w("#searchBar").onKeyPress(function (event) {
    if (event.key === "Enter") {
        search();
    }
});

//SEARCH FUNCTION🚀
function search() {

    $w("#dataset1").onReady(function () {
        $w("#dataset1").setFilter(wixData.filter().contains('companyName', String($w('#searchBar').value))
                .and(wixData.filter().contains("industry", String($w('#dropdown1').value)))
                .and(wixData.filter().contains("subIndustry", String($w('#dropdown2').value)))
                 .and(wixData.filter().contains("companySize", String($w('#dropdown3').value))))

            .then(count)

        $w("#resetButton").show();
    })
}

//COUNT FUNCTION👍
function count() {
    let count = $w("#dynamicDataset").getTotalCount();
    if (count > 0) {
        $w("#countText").text = `${count} items found`;

    } else { $w("#countText").text = `No item found`; }

    return count;
}

//CLEAR FILTER 🚀
$w("#resetButton").onClick(function () {

    $w("#dropdown1").value = undefined;
    $w("#searchBar").value = undefined;
    $w('#dropdown2').value = undefined;
    $w('#dropdown3').value = undefined;

    $w("#resetButton").hide();
    $w("#dynamicDataset").setFilter(wixData.filter()).then(count);

});

//COUNT BEFORE PAGE LOADS❗
$w("#dynamicDataset").onReady(function () {
    count();
});

```

});

**Additional information:**  
[Include any other pertinent details or information that might be helpful for people to know when trying to answer your question.]
