Can someone look at this code and help clean it up? Repeater Search Bar not working!

I got this code from someone on youtube and tried to follow it but its not working… I appreciate your help!

import { local } from ‘wix-storage’ ;

// $w(‘#dataset1’).onReady(function) () {
import wixData from ‘wix-data’ ;

$w . onReady ( function () {

var sameWord = local . getItem ( “searchWord” );

$w ( “#searchBar” ). value = sameWord ;

// $w(“#searchBar”).placeholder = sameWord;

    search (); 

}); 

// });

export function searchButton_click_1 ( event ) {

search (); 

}

function search ( ) {

   wixData . query ( 'HangOutDatabase' ) 

   . contains ( 'Name' ,  $w ( "#searchBar" ). value ) 

   . or ( wixData . query ( 'HangOutDatabase' ). contains ( 'location' ,  $w ( "#searchBar" ). value )) 

   . or ( wixData . query ( 'HangOutDatabase' ). contains ( 'hang out title' ,  $w ( "#searchBar" ). value )) 

   . or ( wixData . query ( 'HangOutDatabase' ). contains ( 'hang out description' ,  $w ( "#searchBar" ). value )) 

   . or ( wixData . query ( 'HangOutDatabase' ). contains ( 'requirements' ,  $w ( "#searchBar" ). value )) 

   . or ( wixData . query ( 'HangOutDatabase' ). contains ( 'personal information' ,  $w ( "#searchBar" ). value )) 

   . or ( wixData . query ( 'HangOutDatabase' ). contains ( 'additional information' ,  $w ( "#searchBar" ). value )) 

   . find () 

   . then  ( res  => { 

         $w ( '#repeater1' ). data  =  res . items ; 

   }); 

}

Hi @depthrecords ,

What is not working?

Do you see any error from the console?

Have you updated the field key and collection ID?

Certified Code Logo

when I click the search bar button nothing in the search shows in the repeater

the editor doesn’t show any errors

it says there is “no hangoutdatabase” found, is my code wrong? should I not say “hagoutdatabase” and just keep “data” or “dataset”? my database is HangOutDatabase and my dataset is “HangOutDataset”

You should update that with your own database ID, field keys.

everything looks correct in the database, do you see anything wrong with the code?

yea i don’t know if that is what i need, I only have one database / dataset

Please learn more at Velo: Working with the Data API | Help Center | Wix.com

thanks for your help, this should work

If you open double-posts, please also link each other, so everybody can get all informations about an issue…
https://www.wix.com/velo/forum/coding-with-velo/need-help-with-checkbox-repeater-code