I want a search bar in which if the user enters something he gets the result (in repeater) on button click. The search should check for two fields in the dataset and show results. Currently, I am using 2 input elements and I want to combine them. I took the help of this code from a video on youtube (you tube. com / watch ? v = m TRSP Nos LR w)
I am new to JavaScript! 
In short, I want to combine both search input elements.
import wixData from 'wix-data';
$w.onReady(function () {
});
let debounceTimer;
export function button6_click_1(event) {
if(debounceTimer){
clearTimeout(debounceTimer);
debounceTimer = undefined;
}
debounceTimer = setTimeout(() => {
filter($w('#search1input').value);
},200);
}
let lastFilterName;
function filter (frameNo) {
if(lastFilterName !== frameNo){
$w('#dataset1').setFilter(wixData.filter().contains('frameNo', frameNo));
lastFilterName = frameNo;
}
}
----------------------
let dbounceTimer;
export function button7_click_1(event) {
if(dbounceTimer){
clearTimeout(dbounceTimer);
dbounceTimer = undefined;
}
dbounceTimer = setTimeout(() => {
filter1($w('#search2input').value);
},200);
}
let lFilterName;
function filter1 (registrtionNo) {
if(lFilterName !== registrtionNo){
$w('#dataset1').setFilter(wixData.filter().contains('registrationNo', registrtionNo));
lFilterName = registrtionNo;
}
}
Thanks in advance.
To search in two different columns you will need something like this oneā¦
import wixData from"wix-data";
$w.onReady(function(){ })
function myFilter() {
wixData.query("DATABASE").contains("REFERENCE-1", "VALUE")
.or(wixData.query("DATABASE").contains("REFERENCE-2", "VALUE"))
.or(wixData.query("DATABASE").contains("REFERENCE-3", "VALUE"))
.find()
.then( (results) => {
console.log(results)
})
}
Sorry to say but as I told you I am new to javascript I donāt know what is reference and and how to get value in a function without a parameter.
Hi,
Is there anyone to answer PLEASE!!
I am new to JavaScript! 
But already trying to use ADVANCED-CODE. THIS WONāT WORK!
You should start from SCRATCH, STEP by STEP.
If not delete everything, and start from SCRATCH !
You can use my already given example by quering your DATABASEā¦
import wixData from"wix-data";
$w.onReady(function(){ })
function myFilter() {
wixData.query("DATABASE").contains("REFERENCE-1", "VALUE")
.or(wixData.query("DATABASE").contains("REFERENCE-2", "VALUE"))
.or(wixData.query("DATABASE").contains("REFERENCE-3", "VALUE"))
.find()
.then( (results) => {
console.log(results)
})
}
ā¦or you can look at this example here and work with DATASETā¦
import wixData from 'wix-data';
export function button6_click_1(event) {myFunction()}
function myFunction (){
$w('#dataset1').setFilter( wixData.filter()
.contains('registrationNo', registrtionNo)
.or(wixData.filter().contains('frameNo', frameNo)
)
)
.then( (res) => {
console.log(res.items)
console.log("Dataset is now filtered");
})
.catch( (err) => {
console.log(err);
});
}
Forget all that ādebounce-shitā, first get your code to work, then you can expand itāS functionalities. 
Thanks @russian-dima This solution has helped me a lot. And I will never forget your advice.
@bbbppanipat
My question is, could you get it to work ?
Is it working right now?
If yes, then my advice was ok and you can give me a like or even a best answer who knows.
But if it is still not working, do not be shy and ask again.
Just the person who asks and is interessted will learn new stuff.
@russian-dima
Sorry I didnāt open account for days.
Ya, I was able to get it work.
Ya, It is working.
I was taging it as best answer but as it is a reply not a comment It canāt be.
Thanks For your support.
Also I want to ask that-
I have used certain filters on my dataset for repeater in dataset settings but as I use search bar It ignores those filters means search bar check the whole data and show results not the filtered data.
How could I do that.
Pls only gave me some piece of code, I will try after on my own.
If I would not able to find I ask Youš
Thanks in advance.
Hello again,
did you have seen all of my examples?
There are already about 40+ EXAMPLES on my page, perhaps you will find your answer, when regarding the examples.
Did you see this one? ā¦
https://russian-dima.wixsite.com/meinewebsite/repeater-dropdown
I will check and tell you soon!!
@russian-dima I check your site it was wonderful loaded with examples,
but the problem I have was not solved there
Actually, the main motive is that search should only check for filtered content not the whole dataset.
@bbbppanipat
I do not understand you completely.
Do you create your own Searchbar, or do you use the Wix-Searchbar?
If you use the Wix-Searchbar, then you should always take a look, which functionalities are given in the CORVID-API, to work with it.
Take a look hereā¦
https://www.wix.com/corvid/reference/wix-search#top
@russian-dima
I have made my own search bar using the code you gave me.
And I have used certain filters on the data in data settings

this is my setup.
Question- When i use my Mobile no search it search the whole dataset not the filtered data.
@bbbppanipat
This is a new question, where i canāt really help.
You should better open a new POST.
@russian-dima Ok thanks for your support.